-
Install dependencies
$ npm install
-
Create a
.env
file with the required environment variables
- DB_NAME
- DB_HOST
- DB_PORT
- DB_USER
- DB_PASSWORD
- ENV
- FACEBOOK_APP_ID
- FACEBOOK_APP_SECRET
You may also add either of these optional environment variables:
- EARLY_ACCESS_SIGNUP
Alternatively, create a file .env.production
if needed
3: Start the app locally
$ npm start
- Inspect the service document at localhost:4000
1: Download Heroku CLI and PostgreSQL
2: Log in to Heroku
heroku login
3: Connect to a database using psql
# staging db:
npm run psql:st
# production db:
npm run psql:prod
-
Create a new DB migration
-
Create a new table migration
npm run create-table-migration <tableName>
-
Populate the table if desirable
npm run create-insert-migration <tableName>
-
-
Edit the migrations file in
./db/migrations
-
Run the migrations against the server
npm run migrate-up