-
-
Notifications
You must be signed in to change notification settings - Fork 47
Database Installation and Execution
You will need a few programs to help to insert, change or translate content. If you are in coding, you might prefer other ways of installing the required software or even have it on your system already.
Git is a source control management software (SCM). Using Git, you can keep track of changes to your files, so that you always know what happened in the past. Changes in a repository (short repo) are applied using commits, which act like save points, so you can always get back and forth between them, if needed. Since changes are usually not applied linearly (not everyone is working directly on the same version status), you can create branches. This way, you can branch off a certain commit, work on that independently of others, and once you are ready, you can merge your changes back. There is always at least one branch in a repository you can branch off and merge into. In our workflow, this is usually done using pull requests (PRs) on GitHub.
You will also need Node.js at version 24 or higher, since the editor uses it. On the Node.js download webpage, scroll down to the version for “prebuilt” installers and select the appropriate one for your system.
After installing all prerequisites and after your account is added to the relevant areas on GitHub, follow the instructions in the elyukai/optolith-data-installer repository. It contains a script that allows the installation without using any terminal or code editor directly. During the installation, you will be prompted to enter your GitHub username and password for authentication. This is required to copy the private database repository to your hard drive.
To actually get the database, clone the elyukai/optolith-data repository and install the necessary dependencies using npm ci.
Do not use npm install/npm i unless you want to explicitly upgrade dependencies, as the install command might update the package-lock.json, which should not be happening in standard content updates.
Like the installer script, there is a script for starting the database program. This is within the database repository and, again, according to your operating system either run.command (macOS for Finder; you will need to follow the same instructions as for the installer script), run.sh (Linux/macOS) or run.ps1 (Windows). It makes sure that your version of the database is up-to-date and starts the database program afterwards. You can access the database editor in the browser of your choice under http://localhost:3000.
There are multiple commands to choose from:
-
npm start: start the database server at http://localhost:3000 -
npm test: validate the database files and emit all errors -
npm run format: format the contents of the database files to provide consistent and predictable Git diffs