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 installnpm install npm -gInstall the JavaScript dependencies:
npm installWe are using the mongodb-memory-server on testing. Thus, you need only run the following command:
npm run testWhenever 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 buildnpm startWhenever you want to run in development mode:
npm run dev