intial commit
This commit is contained in:
10
backend/app.ts
Normal file
10
backend/app.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import express from "express";
|
||||
import { setupRoutes } from "./src/routes/routeHandler.js";
|
||||
|
||||
const app = express();
|
||||
|
||||
setupRoutes(app);
|
||||
|
||||
app.listen(3000, () => {
|
||||
console.log("Listening on port 3000");
|
||||
});
|
||||
10
backend/src/routes/routeHandler.ts
Normal file
10
backend/src/routes/routeHandler.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { Express, Response } from "express";
|
||||
|
||||
export const setupRoutes = (app: Express) => {
|
||||
app.get("/", (_, res: Response) => {
|
||||
res.status(200).json({
|
||||
success: true,
|
||||
message: "This is just an example of this working",
|
||||
});
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user