-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
26 lines (19 loc) · 786 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
const express = require('express');
const cookieParser = require('cookie-parser');
const expressLayouts = require ('express-ejs-layouts');
const app = express();
const port = process.env.PORT || 3000;
require('dotenv').config();
app.use(cookieParser());
app.use(express.urlencoded({extended: true}));
app.use(express.static('public'));
app.use(expressLayouts);
app.set('layout', './layouts/main');
app.set('view engine', 'ejs');
/*const navigationRoutes = require('./server/routes/navRoutes.js');
const recipesRoutes = require('./server/routes/recipeRoutes.js');
app.use('/', navigationRoutes);
app.use('/recipes', recipesRoutes);*/
const routes = require('./server/routes/recipeRoutes.js');
app.use('/', routes);
app.listen(port, () => console.log(`Listening to port ${port}`));