forked from mikepfeiffer/node-express-azure
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
24 lines (19 loc) · 680 Bytes
/
app.js
File metadata and controls
24 lines (19 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const config = require('./config');
const express = require('express');
const path = require('path');
const exphbs = require('express-handlebars');
const index = require('./routes/index');
const who = require('./routes/who');
const contact = require('./routes/contact');
const app = express();
app.set('views', path.join(__dirname, 'views'));
app.engine('handlebars', exphbs({defaultLayout: 'main'}));
app.set('view engine', 'handlebars');
app.set('port', config.port);
app.use('/', express.static('public'))
app.use('/', index);
app.use('/who', who);
app.use('/contact', contact);
app.listen(config.port, () => {
console.log(`Demo app is running on ${config.port}!`);
});