mirror of
https://github.com/Down2Jam/Jamcore.git
synced 2026-06-13 11:26:28 -04:00
Backend for the D2Jam game jam site.
https://d2jam.com
- TypeScript 98.9%
- JavaScript 0.7%
- PLpgSQL 0.3%
| .devcontainer | ||
| .github/workflows | ||
| .vscode | ||
| auth | ||
| config | ||
| contracts | ||
| docs | ||
| domain | ||
| features | ||
| generated | ||
| guards | ||
| infra | ||
| jobs | ||
| lib | ||
| loaders | ||
| middleware | ||
| prisma | ||
| public | ||
| routes | ||
| runtime | ||
| scripts | ||
| tests | ||
| types | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .nvmrc | ||
| app.config.example.json | ||
| app.ts | ||
| docker-compose.yml | ||
| Dockerfile | ||
| LICENSE | ||
| main.ts | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| vitest.config.ts | ||
Jamcore
Backend API for Down2Jam.
Local Development
npm install
npm run dev
By default the API runs on http://localhost:3005.
Create a .env file with database and auth settings:
POSTGRES_USER=jammer
POSTGRES_PASSWORD=INSERTPASSWORDHERE
POSTGRES_DB=jamcore
TOKEN_SECRET=RANDOMSTRINGHERE
Docker
docker compose up --build -d
This starts Jamcore and its Postgres database.
Production
npm run build
npm start
Useful environment variables:
NODE_ENV=production
PORT=3005
CLIENT_ORIGIN=https://d2jam.com
DATABASE_URL=postgresql://user:password@host:5432/database
TOKEN_SECRET=RANDOMSTRINGHERE
Configuration
Optional app overrides can be placed in app.config.json or pointed to with APP_CONFIG_PATH.
Use app.config.example.json as the starting point.
Health
GET /healthzGET /readyzGET /metricsGET /api/v1/openapi