Backend
Last updated
Was this helpful?
Last updated
Was this helpful?
Run the following command to install everything through docker.
The installation takes a bit longer on the first pass or on rebuild ...
$ docker-compose up
# rebuild the containers for a cleanup
$ docker-compose up --build
Open another terminal and create unique indices with:
$ docker-compose exec neo4j migrate
Your backend is up and running at http://localhost:4000/ This will start the GraphQL service (by default on localhost:4000) where you can issue GraphQL requests or access GraphQL Playground in the browser.
You can access Neo4J through http://localhost:7474/ for an interactive cypher
shell and a visualization of the graph.
If you want your backend to return anything else than an empty response, you need to seed your database:
In another terminal run:
$ docker-compose exec backend yarn run db:seed
To reset the database run:
$ docker-compose exec backend yarn run db:reset
# you could also wipe out your neo4j database and delete all volumes with:
$ docker-compose down -v
Beware: We have no multiple database setup at the moment. We clean the database after each test, running the tests will wipe out all your data!
Run the jest tests:
$ docker-compose exec backend yarn run test:jest
Run the cucumber features:
$ docker-compose exec backend yarn run test:cucumber