javascript - How does Sails.js work on heroku? -


i've created simple app sails.js , deployed heroku, works fine.
here procfile:

web: sails lift 

but on heroku (as think) there no binary sails installed, how work?

update:

i've removed main , start sections package.json in case npm start command used, app still runs fine.
i've added --prod option in procfile , treated correctly.

here git push output (no warn/err procfile)

-----> node.js app detected     pro tip: specify node version in package.json    see https://devcenter.heroku.com/articles/nodejs-support  -----> defaulting latest stable node: 0.10.28 -----> downloading , installing node -----> restoring node_modules directory cache -----> pruning cached dependencies not specified in package.json -----> writing custom .npmrc circumvent npm bugs -----> exporting config vars environment -----> installing dependencies -----> caching node_modules directory future builds -----> cleaning node-gyp , npm artifacts -----> building runtime environment -----> discovering process types    procfile declares types -> web -----> compressing... done, 19.3mb -----> launching... done, v8 

and heroku logs (process started sails lift --prod command, not node app.js)

slug compilation started slug compilation finished deploy 35bcbd9 ... release v8 created .. unidling state changed down starting starting process command `sails lift --prod` memory, , not scale past single process. warning: connection.session() memorystore not designed production environment, leak info:    sails.js           <| info:  info:                       /|.\ info:    v0.9.16             |\ info:                 `--'-------'  info:                      / || \ info:                 .-'.-==|/_--' info:    __---___--___---___--___---___--___ info:                    ,'  |'  \ info: see app, visit http://localhost:3661  debug: -------------------------------------------------------- info: server lifted in `/app` info:  ____---___--___---___--___---___--___-__ info:  info: shut down sails, press <ctrl> + c @ time. info:  debug: :: sat may 17 2014 09:37:00 gmt+0000 (utc) debug:  debug: environment : production debug: -------------------------------------------------------- debug: port        : 3661 state changed starting 

is understanding heroku takes binaries node_modules , add them path (or that.

another option perhaps procfile not being taken account (like if misplaced or wrong it), default "npm start", in package.json redirects "node app.js" (instead of sails binary).

in case, don't have profile, , works ok, don't know if defaults "npm start" or codeship.io (my build system) telling heroku (i touched no configuration @ all).

update: according heroku documentation (https://devcenter.heroku.com/articles/nodejs-support),

the following environment variables set: path=vendor/node/bin:bin:node_modules/.bin:$path

that node_modules/.bin stuff trick :)


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -