Skip to content

Latest commit

 

History

History
87 lines (68 loc) · 2.1 KB

README.md

File metadata and controls

87 lines (68 loc) · 2.1 KB

Tools Summary

Prerequisites

Install Node and PostgreSQL

Run the following to create the test and dev databases, replacing app with the name of your app:

createdb app_test;
createdb app_dev;

Installation

npm install

Environment Variables

Create a root .env file with contents in the format VAR=VALUE in order to specify environment variables when running the app locally.

For example,

TEST_DATABASE_URL=postgres://localhost/app_test
DATABASE_URL=postgres://localhost/app_dev
NODE_ENV=development

Building the App

npm run build

Delete dist folder and then rebuild

npm run build-clean

Build and watch for changes

npm run build-watch

Linting

npm run lint

Testing

npm test

Generate Test Coverage

npm run coverage

View Test Coverage

npm run view-coverage

Starting the App

npm start

To delete and build the dist folder, run the linter, and start the server:
npm restart

Deploying the App

Provisioning the Heroku Postgres addon [Info]

For help deplying a Node.js app to heroku:
Getting Started on Heroku with Node.js