File size: 697 Bytes
6ce9b06
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
```typescript
import express from "express";
import { chatRouter } from "./routes/chat.js";
import { filesRouter } from "./routes/files.js";
import { projectsRouter } from "./routes/projects.js";
import { jobsRouter } from "./routes/jobs.js";

const app = express();
app.use(express.json({ limit: "20mb" }));

app.get("/health", (_req, res) => res.json({ ok: true, name: "Rosalinda" }));

app.use("/api/chat", chatRouter);
app.use("/api/files", filesRouter);
app.use("/api/projects", projectsRouter);
app.use("/api/jobs", jobsRouter);

const port = process.env.PORT ? Number(process.env.PORT) : 3333;
app.listen(port, () => console.log(`Rosalinda server running on http://localhost:${port}`));
```