A barebones Node.js app using Express 4.
This application supports the Getting Started with Node on Heroku article - check it out.
Make sure you have Node.js and the Heroku Toolbelt installed.
$ git clone git@github.com:heroku/node-js-getting-started.git # or clone your own fork
$ cd node-js-getting-started
$ npm install
$ npm start
Your app should now be running on localhost:5000.
$ heroku create
$ git push heroku master
$ heroku open
or
[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
For more information about using Node.js on Heroku, see these Dev Center articles:
- Getting Started with Node.js on Heroku
- Heroku Node.js Support
- Node.js on Heroku
- Best Practices for Node.js Development
- Using WebSockets on Heroku with Node.js
https://devcenter.heroku.com/articles/config-vars
$ heroku config:set S3_KEY=8N029N81 S3_SECRET=9s83109d3+583493190 Setting config vars and restarting myapp... done, v14 S3_KEY: 8N029N81 S3_SECRET: 9s83109d3+583493190
if (process.env.NODE_ENV.replace(/\W/g, '') == 'development') { console.log('ok'); }
heroku local web
SET NODE_ENV=production
https://github.com/pselle/search-and-save http://www.hacksparrow.com/running-express-js-in-production-mode.html http://blog.taylormcgann.com/tag/bash_profile/