Human Connection
docs-354-kubernetes_cron_job_for_backups
docs-354-kubernetes_cron_job_for_backups
  • Introduction
  • Edit this Documentation
  • Installation
  • Backend
    • GraphQL
  • Webapp
    • COMPONENTS
    • PLUGINS
    • STORE
    • PAGES
    • ASSETS
    • LAYOUTS
    • Styleguide
    • STATIC
    • MIDDLEWARE
  • Testing Guide
    • End-to-end tests
    • Frontend tests
    • Backend tests
  • Contributing
  • Kubernetes Deployment
    • Minikube
    • Digital Ocean
      • Kubernetes Dashboard
      • HTTPS
    • Human Connection
    • Volumes
      • Neo4J Offline-Backups
      • Volume Snapshots
      • Reclaim Policy
      • Velero
    • Legacy Migration
  • Feature Specification
  • Code of conduct
  • License
Powered by GitBook
On this page
  • Backend
  • Installation
  • Testing

Was this helpful?

Backend

PreviousInstallationNextGraphQL

Last updated 6 years ago

Was this helpful?

Backend

Installation

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

For the local installation you need a recent version of (>= v10.12.0) and along with plugin installed on your system.

Download and unpack the files.

Download and drop the file into the plugins folder of the just extracted Neo4j-Server Note that grand-stack-starter does not currently bundle a distribution of Neo4j. You can download and run locally for development, spin up a , run Neo4j in one of the , or on Debian-based systems install . Just be sure to update the Neo4j connection string and credentials accordingly in .env. Start Neo4J and confirm the database is running at .

Now install node dependencies with :

$ cd backend
$ yarn install

Copy Environment Variables:

# in backend/
$ cp .env.template .env

Configure the new files according to your needs and your local setup.

Create unique indices with:

$ ./neo4j/migrate.sh

Start the backend for development with:

$ yarn run dev

or start the backend in production environment with:

yarn run start

Your backend is up and running at This will start the GraphQL service (by default on localhost:4000) where you can issue GraphQL requests or access GraphQL Playground in the browser.

Seed Database

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

Run:

$ yarn run db:seed

To reset the database run:

$ yarn run db:reset

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:

$ docker-compose exec backend yarn run test:jest

Run the cucumber features:

$ docker-compose exec backend yarn run test:cucumber

Run the jest tests:

$ yarn run test:jest

Run the cucumber features:

$ yarn run test:cucumber

You can access Neo4J through for an interactive cypher shell and a visualization of the graph.

http://localhost:7474/
node
Neo4J
Apoc
Neo4j Community Edition
Neo4j Apoc
Neo4j Desktop
hosted Neo4j Sandbox instance
many cloud options
spin up Neo4j in a Docker container
Neo4j from the Debian Repository
http://localhost:7474
yarn
http://localhost:4000/
GraphQL Playground