Work in progress
Graphql Server build with node and apollo server. The server also implements the Graphql subscriptions.
- node (I use v8)
- npm
- docker
- docker-compose
- mongodb (No need to have it running if you use docker-compose)
note If you dont want to use docker, you can run it with the npm scripts, but you will have to run a mongodb instance and set the environment variables.
- Clone the repo in you local machine
git clone https://github.com/jmn8718/node-gql-subscriptions.git
- Create a .env file, you can duplicate the .env.example and set your value.
- Build the images with docker compose
docker-compose build
- Start the project with docker compose
docker-compose up
- Now that the server is up, we can:
- Go to http://localhost:3000/graphiql and you will see the graphiql interface
- Call the API endpoints ex. http://localhost:3000/api/v1/devices