Skip to content

Developer setup

Nathanaël Houn edited this page Feb 28, 2021 · 40 revisions

Requirements

  • NodeJS (at least > v14)
  • MariaDB > v10.4
  • Git
  • Bash (or equivalent) to run the git hooks

Git hooks

We use some githooks to automate some tasks: format & lint code, run tests, update API documentation. Install them in your local repository with ./githooks/setup-hooks.sh. This requires to have the API repository cloned next to the main repository

$ ls -l MAIN_FOLDER
guacamole/
guacamole-api-docs/
wiki/
[... other files]

Create the database

[mariadb]: CREATE USER 'guacamoleUser'@'localhost' IDENTIFIED BY 'p@ssword';
[mariadb]: CREATE DATABASE guacamoleDb;
[mariadb]: GRANT ALL PRIVILEGES ON guacamoleDb.* TO 'guacamoleUser'@'localhost';

# Also create the database for tests
CREATE DATABASE guacamoleTestDb;
GRANT ALL PRIVILEGES ON guacamoleTestDb.* TO 'guacamoleUser'@'localhost';

Insert test data in the database with the scripts in ./server/test/required_data/*.sql. Note that the database is emptyied after each test.

Run development server

You can use nodemon to auto-reload the server on changes. For the client, use npm run start to start the Create-React-App script, which is watching the changes by default

Clone this wiki locally