-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
26 lines (21 loc) · 934 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
const bodyParser = require('body-parser')
const cookieParser = require('cookie-parser')
const Express =require ("express");
const path = require('path');
const app = Express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: false}));
app.use(cookieParser(process.env.COOKIE_SECRET, { sameSite: "none", secure: true }));
app.use(Express.static(path.join(__dirname, './public')));
//routes
app.use('/', require('./routes/index'));
app.use('/home', require('./routes/home_controller'));
app.use('/users',require('./routes/user_controller'))
app.use('/notice',require('./routes/notice_controller'))
app.use('/schedule', require('./routes/schedule_controller'))
app.use('/review', require('./routes/review_controller'))
app.set('view engine', 'ejs');
app.set('views', path.join(__dirname, 'views'));
app.listen(process.env.PORT || 3000,()=>{
console.log('3000번 포트에 server를 띄웠습니다.')
})