TypeScript/Bun project scaffold
- Stack: Bun, Hono, Drizzle ORM, Zod, Handlebars, Pino - Models: ticket, queue, transaction, scrip, template, custom_field, user, lifecycle - Scrip engine: prepare/commit two-phase dispatch, template rendering, mock actions - Lifecycle validator: state machine transition validation with wildcard support - Routes: health, tickets (full CRUD + preview + transactions), queues, scrips, custom-fields, lifecycles - Middleware: Pino logging, error handler - Database: Drizzle ORM schema + initial migration (10 tables) - Type-check: passes (tsc --noEmit, zero errors)
This commit is contained in:
9
src/config.ts
Normal file
9
src/config.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { z } from 'zod/v4';
|
||||
|
||||
const configSchema = z.object({
|
||||
DATABASE_URL: z.string().min(1),
|
||||
SERVER_HOST: z.string().default('127.0.0.1'),
|
||||
SERVER_PORT: z.coerce.number().int().positive().default(8080),
|
||||
});
|
||||
|
||||
export const config = configSchema.parse(process.env);
|
||||
Reference in New Issue
Block a user