Initial Code

This commit is contained in:
2025-10-24 01:32:42 -04:00
parent 62f568794a
commit 844253ed13
19 changed files with 744 additions and 126 deletions

28
server/server.js Executable file
View File

@@ -0,0 +1,28 @@
// @ts-nocheck
import { handler } from '../build/handler.js';
import dotenv from 'dotenv';
import http from 'http';
import express from 'express';
import cors from 'cors';
dotenv.config();
const app = express();
const server = http.Server(app);
app.use(cors());
app.use(handler);
server.listen(process.env.PORT, () => {
console.log(`listening on port http://localhost:${process.env.PORT}`);
});
process.on('unhandledRejection', (reason, promise) => {
console.log('Unhandled Rejection at:', reason.stack || reason);
});
process.on('uncaughtException', (error) => {
console.log('Uncaught Exception thrown');
console.error(error);
});