git clone git@github.com:thefelpes/backend-graphql.git
- Install Node.js (nvm is recommended): See the nvm documentation for instructions on installing it with your OS.
- Install MongoDB: See the MongoDB documentation for instructions on installing it with your OS.
Once you have NVM and MongoDB installed locally, let's install the Node.js from .nvmrc
file, and ensure that your npm is up-to-date.
nvm install
npm install npm -g
Install the JavaScript dependencies:
npm install
We are using the mongodb-memory-server
on testing. Thus, you need only run the following command:
npm run test
Whenever you want to run locally you have to have MongoDB running in the background. Example from mongodb documentation: Runnig mongodb on ubuntu.
Whenever you want to run in production mode you have to have build the app and to after run the app:
npm run build
npm start
Whenever you want to run in development mode:
npm run dev