feat: add infrastructure foundation — scripts, schema key, new routes, model fields
- Add npm scripts for dev, migrate, seed, smoke - Add key column to scrips table (unique short identifier) - Register users and templates routes in server - Set development: false in Bun.serve for production mode - Add description and custom_fields to CreateTicketSchema - Make owner_id nullable/optional for unassigned tickets - Add migration for custom field key column Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,8 @@ import { createQueuesRouter } from './routes/queues.ts';
|
||||
import { createScripsRouter } from './routes/scrips.ts';
|
||||
import { createCustomFieldsRouter } from './routes/custom-fields.ts';
|
||||
import { createLifecyclesRouter } from './routes/lifecycles.ts';
|
||||
import { createUsersRouter } from './routes/users.ts';
|
||||
import { createTemplatesRouter } from './routes/templates.ts';
|
||||
|
||||
let db: Db | null = null;
|
||||
|
||||
@@ -31,6 +33,8 @@ app.route('/queues', createQueuesRouter(getDb()));
|
||||
app.route('/scrips', createScripsRouter(getDb()));
|
||||
app.route('/custom-fields', createCustomFieldsRouter(getDb()));
|
||||
app.route('/lifecycles', createLifecyclesRouter(getDb()));
|
||||
app.route('/users', createUsersRouter(getDb()));
|
||||
app.route('/templates', createTemplatesRouter(getDb()));
|
||||
|
||||
export default app;
|
||||
export { app };
|
||||
@@ -41,6 +45,7 @@ if (Bun.main === import.meta.path) {
|
||||
fetch: app.fetch,
|
||||
port: config.SERVER_PORT,
|
||||
hostname: config.SERVER_HOST,
|
||||
development: false,
|
||||
});
|
||||
console.log(`Server running at http://${config.SERVER_HOST}:${config.SERVER_PORT}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user