felipecodes / backend-graphql

:fire: My study/challenge about GraphQL Server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GraphQL Server

Setup

Downloading the code by cloning the repository:

git clone git@github.com:thefelpes/backend-graphql.git

Instalation

  1. Install Node.js (nvm is recommended): See the nvm documentation for instructions on installing it with your OS.
  2. 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

Running the tests

We are using the mongodb-memory-server on testing. Thus, you need only run the following command:

npm run test

Running the app

Whenever you want to run locally you have to have MongoDB running in the background. Example from mongodb documentation: Runnig mongodb on ubuntu.

Starting the server

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

About

:fire: My study/challenge about GraphQL Server


Languages

Language:JavaScript 100.0%