+ signup and + verify
All checks were successful
gitea/MERN_STACK_TEMPLATE/pipeline/head This commit looks good
All checks were successful
gitea/MERN_STACK_TEMPLATE/pipeline/head This commit looks good
This commit is contained in:
@ -1,22 +1,18 @@
|
||||
import express from "express";
|
||||
import dotenv from "dotenv";
|
||||
|
||||
import {connectDB} from "./db/connectDB.js";
|
||||
import { connectDB } from "./db/connectDB.js";
|
||||
|
||||
import authRoutes from "./routes/auth.route.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)
|
||||
const PORT = process.env.PORT || 8080;
|
||||
app.use(express.json()); // allows us to parse incoming requests:req.body
|
||||
app.use("/api/auth", authRoutes);
|
||||
|
||||
|
||||
app.listen(8080, () => {
|
||||
app.listen(PORT, () => {
|
||||
connectDB();
|
||||
console.log("Server Started at 0.0.0.0:8080");
|
||||
console.log("Server Started at 0.0.0.0: ", PORT);
|
||||
});
|
||||
|
Reference in New Issue
Block a user