A graphql api with node, apollo-graphql, express and mongodb.
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
Install Docker and run the below command
$ docker-compose up
Steps to use localhost instead of ip address.
In VirtualBox:
- Select "default" machine and click on Setting.
- Navigate to Network > Adapter 1 > Advanced > Port Forwarding.
- Click "+" to add new rule.
- 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.