a simple application that exposes REST APIs for learning
contacts-api
exposes REST endpoints to get, create, update, delete and list contacts.
UI for the app is available here
The following are the default values for respective environments. If necessary, configure using env variables
Configuration | Default value |
---|---|
NODE_ENV | "development" |
PORT | 3000 |
Configuration | Default value |
---|---|
DB_USERNAME | *postgres default |
DB_PASSWORD | *postgres default |
DB_NAME | "contacts_development" |
DB_HOSTNAME | "localhost" |
DB_PORT | 5432 |
Configuration | Default value |
---|---|
DB_USERNAME | *postgres default |
DB_PASSWORD | *postgres default |
DB_NAME | "contacts_test" |
DB_HOSTNAME | "localhost" |
DB_PORT | 5432 |
Configuration | Default value |
---|---|
DB_USERNAME | *postgres default |
DB_PASSWORD | *postgres default |
DB_NAME | "contacts_production" |
DB_HOSTNAME | "localhost" |
DB_PORT | 5432 |
-
Start Postgres server
-
Setup databases in Postgres
npm run createdb
- Using the app
# To install dependencies
npm install
# To start the application
npm start
# To start the server using nodemon
# https://github.com/remy/nodemon
npm run nodemon
# To run tests
npm test
# To run tests with coverage
npm run coverage
# To list all supported commands
npm run