Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# ── Required ──────────────────────────────────────────
DATABASE_URL=postgres://postgres:postgres@localhost:5432/disciplr
JWT_SECRET=change-me-to-a-real-secret-at-least-16-chars

# ── Optional (defaults shown) ────────────────────────
PORT=3000
NODE_ENV=development

# ── Future secrets ────────────────────────────────────
# STELLAR_SECRET_KEY=
# EMAIL_API_KEY=
1 change: 1 addition & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { Config } from 'jest'
const config: Config = {
preset: 'ts-jest/presets/default-esm',
testEnvironment: 'node',
setupFiles: ['./src/tests/setup-env.ts'],
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
Expand Down
4 changes: 4 additions & 0 deletions knexfile.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/**
* Knex migration config for Disciplr backend.
* Uses DATABASE_URL and a dedicated migrations directory.
*
* NOTE: This file reads process.env.DATABASE_URL directly instead of importing
* src/config.ts because the Knex CLI loads it as CommonJS outside the app runtime.
* The canonical validation of DATABASE_URL lives in src/config.ts (Zod schema).
*/
module.exports = {
client: 'pg',
Expand Down
Loading