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