This server is mean't to run on Heroku in production and locally in development. If you don't have a Heroku account, create one here: https://signup.heroku.com/login
- Heroku Account
- Heroku Toolbelt
- Node & NPM
- Install
Sails & Forever
- Install
- Postgres
- Redis
Update the .env file for your environment
- Install modules
npm install - Confirm that you have Postgres and Redis running and configured properly
- Run command
foreman start. This will start the server with all the environment variables needed to make the app work. - Watch your logs live by running this command
forever logs -f app.js - If you want to kill the server, run
forever stopallorforever stop <pid>
- Login into Heroku from the toolbelt cli
heroku login - Call
heroku create - Set environmental variables from your
.envon Herokuheroku config:set <env var> --app <app> - Create a Postgres database on Heroku
heroku addons:create heroku-postgresql:hobby-dev - Create a Redis database on Heroku
heroku addons:create heroku-redis:test
- Push code to Heroku
git push heroku master - Watch your logs live by running this command
heroku logs --tail