Docker should be installed on your local machine.
The easiest way to start the CE API including a Neo4j database, is by using Docker compose. By running the following command, two docker containers will be created locally and started locally.
docker-compose up --build
The CE api runs in Node.js v10
Run the following command to install all dependencies:
npm install
The CE-api will need a Neo4j graph database to connect to.
The CE-api application takes its configuration values from the environment variables. Set your Neo4j connection credentials in your environment variables. For example (Linux/Mac):
export NEO4J_URI="bolt://127.0.0.1:7687"
export NEO4J_USER="neo4j"
export NEO4J_PASSWORD="letmein"
Download and install Neo4j Desktop. Follow the manual to create a new database using the example configuration values.
npm start
This will start the GraphQL service (by default on localhost:4000) where you can issue GraphQL requests or access the GraphQL Playground in the browser:
Check if the database connection works by entering the following query in the left section of the interface:
{
__schema {
types {
name
}
}
}
The CE API is an open source project which is being developed for the TROMPA project. If you would like to contribute to this project, please make sure you've read the following sections:
The CE API repository is using two branches; the staging branch which is being used for Pull Requests and testing. Whenever a new version is released, the staging branch gets merged into the master branch. Commits should not be pushed directly to the master branch.
The CE API project implements the Standard JS code style. Before each commit, all changes will be linted and fixed whenever possible. It's also possible to manually run the linter by using the following command: $ npm start lint
.
Commits must validate to the Angular Commit Guidelines. This helps us, amongst others, to auto-generate the CHANGELOG.
If you would like to submit a proposal/change/fix, submit a Pull request to the trompamusic/ce-api repository.