feat: basic api

This commit is contained in:
eneller
2026-03-05 23:31:56 +01:00
parent cef3474c3d
commit 0dd4b6590d
7 changed files with 83 additions and 10 deletions

View File

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