mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-08 03:28:50 +00:00
backend refactored
This commit is contained in:
commit
7ba2a34eb1
13 changed files with 684 additions and 16 deletions
|
@ -1,13 +1,17 @@
|
|||
import express, { Request, Response } from 'express';
|
||||
import express, { Request, Response } from "express";
|
||||
|
||||
import dotenv from "dotenv";
|
||||
import userRouter from "./routes/userRoutes";
|
||||
import bodyParser from "body-parser";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const app = express();
|
||||
const port = 3000;
|
||||
|
||||
app.get('/', (req: Request, res: Response) => {
|
||||
res.send('Hallo, Welt mit TypeScript!');
|
||||
});
|
||||
app.use(bodyParser.json());
|
||||
app.use("/api/user", userRouter);
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`Server läuft auf http://localhost:${port}`);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue