Files
library/api/src/main.ts
T
naomi 9caf74945a
Node.js CI / CI (push) Failing after 10s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m50s
feat: another security sweep
2026-02-04 22:02:24 -08:00

25 lines
573 B
TypeScript

import Fastify from 'fastify';
import { app } from './app/app';
const host = process.env.HOST ?? 'localhost';
const port = process.env.PORT ? Number(process.env.PORT) : 12321;
// Instantiate Fastify with some config
const server = Fastify({
logger: true,
bodyLimit: 1048576, // 1MB max body size
});
// Register your application as a normal plugin.
server.register(app);
// Start listening.
server.listen({ port, host }, (err) => {
if (err) {
server.log.error(err);
process.exit(1);
} else {
console.log(`[ ready ] http://${host}:${port}`);
}
});