Skip to content

jorgeorm/dev-api

Repository files navigation

DEV API

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.

Installation

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.

Install locally

It is recommended you use NVM, based on your OS you have the following two options.

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 with Docker

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

Contrib List

jorgeorm@gmail.com - Jorge

About

Test api built on express.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published