oxynote/server
2026-08-03 19:32:01 +02:00
..
auth-realtime add server 2026-08-03 19:32:01 +02:00
core add server 2026-08-03 19:32:01 +02:00
CLAUDE.md initial commit 2026-08-03 18:40:10 +02:00
Makefile initial commit 2026-08-03 18:40:10 +02:00
README.md initial commit 2026-08-03 18:40:10 +02:00

Server

To build and run the core and auth-realtime applications simply use the following command:

make run

By default the following ports are opened:

  • 8080 - core application's HTTP and WebSocket server.
  • 8081 - auth-realtime's Hocuspocus HTTP and WebSocket server.

Better Auth

Using Migrations

Execute the SQL migrations inside the postgres container (e.g., via docker desktop).

Generating Migrations

To generate the SQL migration file, start a postgres container:

docker run \
  --name betterauth-db \
  -e POSTGRES_USER=postgres \
  -e POSTGRES_PASSWORD=postgres \
  -e POSTGRES_DB=betterauth \
  -p 5432:5432 \
  --rm \
  postgres

Then put the DB DSN values into the env var:

HEIMDALL_GUARD_DB_DSN=postgresql://postgres:postgres@localhost:5432/betterauth

Then, from within the auth-realtime directory, run (make sure that other env vars that are needed by src/auth.ts are available and exported too):

source ../docker/.env.guard && npx @better-auth/cli generate --output ./sql/better_auth_schema.sql

(You can comment redis, etc. out in the auth.ts file)