Skip to content

pratikmane1299/node-graphql-api

Repository files navigation

node-graphql-api

A graphql api with node, apollo-graphql, express and mongodb.

Requirements

Getting Started

Clone the repo

$ git clone https://github.com/pratikmane1299/node-graphql-api.git
$ cd node-graphql-api

Setup environment vaiables

Copy .env.example to .env and add your own values

Running using Docker

Install Docker and run the below command

$ docker-compose up

Using Docker Toolbox

Steps to use localhost instead of ip address.

In VirtualBox:

  1. Select "default" machine and click on Setting.
  2. Navigate to Network > Adapter 1 > Advanced > Port Forwarding.
  3. Click "+" to add new rule.
  4. Set Host Port <Port as in .env> and Guest Port to <Port as in .env> and leave Host IP & Guest IP empty.

Do the above step for both mongo database and the graphql server.