Backend
Backend
Installation with Docker
Make sure you are on a node version >= v10.12.0
:
Run:
App is running on port 4000
To wipe out your neo4j database run:
Installation without Docker
Install dependencies:
Download Neo4j Community Edition and unpack the files.
Download Neo4j Apoc and drop the file into the plugins
folder of the just extracted Neo4j-Server
Start Neo4j
and confirm it's running here
Copy:
Configure the file .env
according to your needs and your local setup.
Start the GraphQL service:
And on the production machine run following:
This will start the GraphQL service (by default on localhost:4000) where you can issue GraphQL requests or access GraphQL Playground in the browser:
Configure
Set your Neo4j connection string and credentials in .env
. For example:
.env
You need to install APOC as a plugin for the graph you create in the neo4j desktop app!
Note that grand-stack-starter does not currently bundle a distribution of Neo4j. You can download Neo4j Desktop and run locally for development, spin up a hosted Neo4j Sandbox instance, run Neo4j in one of the many cloud options, spin up Neo4j in a Docker container or on Debian-based systems install Neo4j from the Debian Repository. Just be sure to update the Neo4j connection string and credentials accordingly in .env
.
Seed and Reset the Database
Optionally you can seed the GraphQL service by executing mutations that will write sample data to the database:
For a reset you can use the reset script:
Testing
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:
Run the cucumber features:
When some tests fail, try yarn db:reset
and after that yarn db:seed
. Then run the tests again
Last updated