build: fix tsconfig
This commit is contained in:
19
server/src/index.ts
Normal file
19
server/src/index.ts
Normal 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}`);
|
||||
});
|
||||
Reference in New Issue
Block a user