forked from Surajpatra700/Zairza_App_Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
29 lines (24 loc) · 806 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require('dotenv').config();
const express = require("express")
// const bodyparser = require("body-parser")
const PORT = process.env.PORT || 4600
const event = require("./routes/router_event")
const auth = require("./routes/authentication")
const profiles = require("./routes/profiles")
const fileUpload = require("./routes/fileUpload")
const resources = require("./routes/resources")
const app = express();
require("./mongoDB/mongo_conn");
// app.use(bodyparser.urlencoded({extended: true}));
app.use(express.json());
app.use("/zairza",event);
app.use("/zairza",auth);
app.use("/zairza",profiles);
app.use("/zairza",fileUpload);
app.use("/zairza",resources);
app.listen(PORT, (req,res)=>{
console.log("Server Running on: "+PORT);
})
app.get("/", (req,res)=>{
res.send("Welcome to Zairza!")
})