From df16f08e2230be1492f6587db58d2ae0e5475584 Mon Sep 17 00:00:00 2001 From: Leopoldadmin Date: Sun, 21 Jun 2026 20:32:41 +0000 Subject: [PATCH] T01: add backend src/index.ts --- backend/src/index.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 backend/src/index.ts diff --git a/backend/src/index.ts b/backend/src/index.ts new file mode 100644 index 0000000..14c9aa6 --- /dev/null +++ b/backend/src/index.ts @@ -0,0 +1,15 @@ +import app from './server.js'; + +const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 3001; + +const start = async () => { + try { + await app.listen({ port: PORT, host: '0.0.0.0' }); + console.log(`Server listening on port ${PORT}`); + } catch (err) { + app.log.error(err); + process.exit(1); + } +}; + +start(); \ No newline at end of file