this is a backend api (JSON API) for personal project
docker build -t jedrula-nodejs-backend . docker tag jedrula-nodejs-backend jedrula/jedrula-nodejs-backend docker push jedrula/jedrula-nodejs-backend
this service uses https://www.npmjs.com/package/config for managing configuration
by default you will find in the ./config/default.js that mongoDbLocation is expected to be on the localhost:27017/jedrek
you can change it by providing a config file like production.js and spinning up the server like
NODE_ENV=production node index.js
NODE_ENV=local node index.js
you will need to install and spin up mongod server with something along the lines of mongod
-
copy contents of https://github.com/jedrula-communications/personal-project-backend/blob/master/bin/build to a file on the server like build_personal-project-backend
-
sh build_personal-project-backend
-
cd personal-project-backend-master
-
spin it
node index.js
4.1. ... as a service
sudo forever-service install personal-project-backend-master --script index.js -e "NODE_ENV=production"
sudo service personal-project-backend-master start