build: fix tsconfig

This commit is contained in:
eneller
2026-02-28 01:19:35 +01:00
parent e64a77a0d7
commit 05090ebb14
9 changed files with 1355 additions and 4 deletions

7
server/src/db.ts Normal file
View File

@@ -0,0 +1,7 @@
const { Pool } = require("pg");
const pool = new Pool({
connectionString: process.env.DATABASE_URL,
});
module.exports = pool;

19
server/src/index.ts Normal file
View File

@@ -0,0 +1,19 @@
import express, { Express, Request, Response } from "express";
import cors from "cors";
import * as dotenv from "dotenv";
dotenv.config();
const app: Express = express();
app.use(cors());
app.use(express.json());
app.get("/api/health", (req: Request, res: Response) => {
res.json({ status: "OK" });
});
const PORT: number = parseInt(process.env.PORT as string) || 3000;
app.listen(PORT, () => {
console.log(`Server running on port ${PORT}`);
});