Files
Gallus_Pub/backend
Kenzo c289541cd5
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
refactor(cors): simplify origin validation logic in index.ts
- Streamlined CORS logic by consolidating `allowedOrigins` checks and improving readability.
- Updated callback invocations for consistency and clarity.
2025-12-18 13:54:41 +01:00
..

Gallus Pub CMS Backend

Headless CMS backend for managing Gallus Pub website content with Gitea OAuth authentication.

Setup

  1. Install dependencies:
npm install
  1. Create .env file from .env.example:
cp .env.example .env
  1. Update environment variables in .env:

    • Set Gitea OAuth credentials
    • Set Git repository URL and token
    • JWT secrets are already generated
  2. Create data directory and run migrations:

mkdir -p data
  1. Generate and run migrations:
npm run db:generate
npm run db:migrate
  1. Start development server:
npm run dev

Server will run at http://localhost:3000

Available Scripts

  • npm run dev - Start development server with watch mode
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run db:generate - Generate database migrations
  • npm run db:migrate - Run database migrations
  • npm run db:studio - Open Drizzle Studio

Documentation

See parent directory for complete documentation:

  • CMS_CONCEPT.md - System architecture
  • CMS_GITEA_AUTH.md - Authentication details
  • CMS_IMPLEMENTATION_EXAMPLE.md - Code examples
  • CMS_SETUP_GUIDE.md - Deployment guide