The only required dependency to run the server is docker. As everyone's environment is different there are no installation instructions that are guaranteed to work natively.
# under the /server directory copy the config example
cp config.json5.example config.json5in docker-compose.yml replace password with your desired password in the following line:
- NEO4J_AUTH=neo4j/password
In config.json5 change database.password to be the same password.
Set the following 2 properties in config.json5, they determine how authentication tokens are generated from student number:
- config.database.aiPlatformSecretKey
- config.database.aiPlatformSalt
Set the following property in config.json5, it determines what the admin password is by default:
- config.database.defaultAdminToken
Note that when the server is started an admin user is created when, but not deleted when the default admin token changes, and must be manually deleted through neo4j browser.
Add a key/value pair to config.games in the format of the existing examples.
Tokens for students and admins can be generated either from the CLI or the website. The instructions for generating them in the website are located in the website README. Token file contain student numbers in the following format:
20000000
30000000
40000000
...# in /server
docker compose up neo4j
sleep 60 && docker compose run server node . tokens <path-to-token-file># in /server
sleep 60 && docker compose run server node . admin-tokens <path-to-token-file>Please see the website README at /website/README.md for information.
# under the project directory (not in server!)
docker compose build && docker compose upYou may wish to docker compose up neo4j and then run docker compose up once neo4j has started. The server is prone to crashing upon losing connection to the database.
The server runs on port 8080 with the website running at port 3000. The two are not managed by the same program but their own separate containers.
cd tests
docker compose build && docker compose upThe process for running tests is the same as that of running the server but done with the docker containers in the /tests directory.
Make sure that the server or the database are not running at the same time (as they use the same ports).
This is heavily advised against and only applicable to development of the project. The project is expected to be run in docker containers and not officially supported natively.
node.js/npm and python (3) are the only required dependencies.
Installation tutorials:
Recommended:
- node: >14
Requirements for Neo4j:
- java: openjdk version >11 (or equivalent)
- neo4j: >4.4
- apoc: >4.4
cd server
npm ciThis step is optional, please refer here.
# in the /server directory
node .All command under this section are executed under the /server directory.
First change to the client directory and install dependencies:
cd server
npm i
cp config.json5.example config.json5node . start- Start Neo4j
- In Neo4j Browser: Add --> Remote Connection
- Fill in details from
.envfile on the 2 following steps - Connect to the Remote Connection and Open
- If lacking any styling run
:style reset - If server hangs indefinitely disconnect Neo4j browser, and reconnect to the db from the server
Download Neo4j Community edition TODO: install instructions
After installing neo4j you must change the default password
neo4j-admin set-initial-password <insert-password-here> # possibly requiring root permissionsGo to the server dir and edit config.json5
Fill in the same username and password.
This section is only valid on debian based linux distros (ubuntu and ubuntu-derivatives count)
The development build of this project is using:
- neo4j 4.4.10
- APOC 4.4.0.8
- Check neo4j version (
neo4j --version) - Install a matching version of the APOC library (ends in
-all.jar) from the GH releases - Check plugin directory here, at the time of writing the plugin directory is located as follows:
- Debian-based Linux:
/var/lib/neo4j/plugins - MacOS/Linux:
<neo4j-home>/plugins - Windows:
<neo4j-home>\plugins
- Debian-based Linux: