Environment variable | Example | Description |
---|---|---|
PORT | 4000 |
HTTP server port |
APP_BASE_URL | http://localhost:4000 |
Prefixes all route and link generation |
APP_DB_PROTOCOL | mongodb+srv |
MongoDB database protocol |
APP_DB_USER | testuser |
MongoDB database username |
APP_DB_PASS | testpass |
MongoDB database password |
APP_DB_CLUSTER | my.cluster.mongodb.net |
MongoDB database cluster host |
APP_DB_NAME | my-app-db |
MongoDB database name |
APP_DB_FLAGS | retryWrites=true&w=majority |
MongoDB connection options (can be left as an empty string ) |
$ yarn build && PORT=4000 APP_BASE_URL=http://localhost:4000 APP_DB_PROTOCOL=mongodb APP_DB_CLUSTER=localhost:27017 APP_DB_NAME=auth-api APP_DB_USER= APP_DB_PASS= APP_DB_FLAGS= yarn start