-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
29 lines (23 loc) · 792 Bytes
/
app.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
const express = require('express')
const cors = require('cors')
const path = require("path");
const app = express();
var bodyParser = require('body-parser')
var cookieParser = require('cookie-parser');
const userRouter = require("./routes/userRoutes");
const authRouter = require("./routes/authRoutes");
const contactRouter = require('./routes/contactRoutes')
const careerRouter = require('./routes/careerRoutes')
const {getConnect } = require('./config/db');
getConnect();
app.use(bodyParser.json())
app.use(express.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));
app.use(cors())
//Routes
app.use('/', userRouter);
app.use('/', authRouter);
app.use('/',contactRouter)
app.use('/',careerRouter)
module.exports = app;