Install from Source
This path is for developers working from the GEM source tree. For production sites, use the hosted installer instead — it provisions the runtime, database, and service for you.
Prerequisites
Install these yourself for a from-source build:
- Node.js 22.22.2 (the version pinned in
package.json). - PostgreSQL 14+.
1. Set up PostgreSQL
Create the database, user, and schema GEM expects (defaults shown — match them to your gem.json):
CREATE USER gem_user WITH PASSWORD 'gempass';
CREATE DATABASE gem_db OWNER gem_user;
\connect gem_db
CREATE SCHEMA IF NOT EXISTS gem AUTHORIZATION gem_user;
GEM creates its tables in the gem schema on first boot.
2. Get the code and install dependencies
git clone <repository-url> gem_controller
cd gem_controller
npm install
3. Configure
Edit gem.json so the data.connection block matches the database you created above. See Configuration for the full reference.
4. Run
Development — rebuilds the attribute registry, then runs the server with live client tooling:
npm run dev
Production — build the client and server bundles, then start:
npm run build:only # client + server build, no version bump
npm start # NODE_ENV=production node server.js
:::note build vs build:only
npm run build also bumps the version and runs the per-commit documentation update. Use npm run build:only for a plain build with no version bump.
:::
:::warning Reinstall dependencies when they change
When pulling changes that touch package.json, run npm install again before building — a build against stale node_modules can fail in confusing ways.
:::
On first start the server bootstraps exactly as a packaged install does — see First Boot.