This server api has been moved into https://github.com/back2bikes/attandance
This is essentially a fork of the GraphQL/React project https://github.com/Back2bikes/b2b-gql-react that splits out the GraphQL server functionality of that project.
The benefits of this approach are:
- Its easier to work on the Front and the Back end oin parallel
- It's easier to containerise the back end
- Test scripts in the project can focus soley on API testing
- clone this repo
- cd ./attendance-gql-api
- npm install
- export MONGO_URI="mongodb://localhost:27017/b2bikes-db"
- npm start (starts the server)
- Point your browser to http://localhost:3000/ for the GraphiQL interface to run queries and mutations from a browser
If you would like to run dev / staging using docker use the following commands:
This will build / launch the mongodb and api docker services.
docker-compose up -d
This will stop / start the services without updating or removing the containers.
docker-compose stop
docker-compose start
This will stop the services and remove the comtainers.
docker-compose down
- Look into setting up test cases for the GQL API