Public Repository

Last pushed: 5 days ago
Short Description
Short description is empty for this repo.
Full Description

Local Development


Build local development container

$ docker image build -f -t success-center-api-dev .

Start a local Mongo DB

$ docker container run -d --rm -v ~/Mongo/data/db/:/data/db -p 27017:27017 --name mongo mongo

Create a network to connect Mongodb and development container

$ docker network create mongodb_development 
$ docker network connect

Start local development container

$ docker container run -it --rm -v $(pwd):/app -p 8080:80 --name success-center-api-dev success-center-api-dev

Connect the development and mongo containers to the network

$ docker network connect 

Run the yarn command inside your development container.

$ yarn

Running the script

Configuration is stored in the ./config folder. There is a default.json file that contains base configuration. You will also find one config file for each environment.

$ node index.js

To use a different config file change the NODE_ENV environment variable.

$ NODE_ENV=stage node index.js
Docker Pull Command