Test api built over express.js, initially was born to give me a continous learning of different things I want to get my hands on in terms of node.
This could be run natively in your OS, at the moment the only dependency you must take care depending on the OS you have is node-gyp which is used to compile bcrypt. In addition, you can use the docker container that is provided as part of this code-base.
It is recommended you use NVM, based on your OS you have the following two options.
- For OSX/Unix try nvm
- For Windows try nvm-windows
Note that they are two totally different approaches, despite they may seem similar their functionalities may vary. Next, follow the checklist below.
- Check and use Node version in .nvmrc.
- Check that node-gyp dependencies are fullfiled.
- Run
npm install
. - Setup a mongo DB.
- Generate a copy of the .env.sample file named .env.
- Define the variables in the file with the proper values.
- run
npm start
, that should be all, if there are any issues please contact repository admins.
Install both docker and docker-compose.
Once you've completed the installation follow instructions bellow:
- Generate a copy of the .env.sample file named .env.
- Define variables in the file with proper values.
- NOTE: Do not use estrange characters in DB_NAME env var, use camel-case.
- Run
docker-compose up
And voila, thats all!!!
If you want to stop docker containers you can either type docker-compose down
or docker-compose stop
depending if you intend to regenerate the whole setup of containers or just stop and restart
jorgeorm@gmail.com - Jorge