Merge branch 'dev' into feature-mailserver

This commit is contained in:
Stefan
2022-04-02 19:17:26 +02:00
committed by GitHub
18 changed files with 460 additions and 9706 deletions
+14 -4
View File
@@ -1,6 +1,12 @@
import express, { NextFunction, Request, Response } from "express";
import dotenv from "dotenv";
import adminRoutes from "./routes/auth.route";
const testRoutes = require("./routes/testrouter.route");
const ordersRoutes = require("./routes/orders.route");
const organizationsRoutes = require("./routes/organisations.route");
const pizzasRoutes = require("./routes/pizzas.route");
const restaurantsRoutes = require("./routes/restaurants.route");
dotenv.config();
@@ -21,13 +27,17 @@ app.use((err: any, req: Request, res: Response, next: NextFunction) => {
}
});
async function main() {
app.get("/", (req, res) => {
res.send("Hello World!");
});
app.use("/api/auth", adminRoutes);
app.use(express.json());
app.use("/tests", testRoutes);
app.use("/order", ordersRoutes);
app.use("/organization", organizationsRoutes);
app.use("/pizza", pizzasRoutes);
app.use("/restaurant", restaurantsRoutes);
app.listen(3000, () => {
console.log("Server is running on port 3000");
});