Install Brew in your Mac and then install Mongo:
brew install mongodb
Install services in brew to manage MongoDb:
brew tap homebrew/services
Install project dependencies:
npm install
With brew and brew services installed (see above), manage Mongo with following commands:
brew services start mongodb
brew services stop mongodb
brew services restart mongodb
node bin/www
Test script will run the folling commands: lint > unit > integration
npm test
npm run lint
npm run unit-test
Note: Before you should start mongodb service.
npm run integration-test
docker-machine start
docker-machine env
eval $(docker-machine env)
docker-compose -f docker-compose-dev.yml build db
docker-compose -f docker-compose-dev.yml build test
OR
docker-compose -f docker-compose-dev.yml build web
docker-compose -f docker-compose-dev.yml up web
It will expose the 3001 port in the docker machine. You can check it by typing docker ps
.
docker-compose -f docker-compose-dev.yml run test
docker-compose -f docker-compose-dev.yml run test npm run lint
docker-compose -f docker-compose-dev.yml run test npm run unit-test
docker-compose -f docker-compose-dev.yml run test npm run integration-test