Files
MERN_STACK_TEMPLATE/backend/server.js
Dongho Kim 7333cf79bd
All checks were successful
gitea/MERN_STACK_TEMPLATE/pipeline/head This commit looks good
added to routes for the user auth
2025-05-02 13:24:52 +02:00

23 lines
398 B
JavaScript

import express from "express";
import dotenv from "dotenv";
import {connectDB} from "./db/connectDB.js";
import authRoutes from "./routes/auth.route.js"
dotenv.config();
const app = express();
app.get("/", (req, res) => {
res.send("Hello World!");
});
app.use("/api/auth", authRoutes)
app.listen(8080, () => {
connectDB();
console.log("Server Started at 0.0.0.0:8080");
});