Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepfeiffer committed Dec 21, 2018
1 parent d5fd4ce commit f13eed9
Show file tree
Hide file tree
Showing 11 changed files with 356 additions and 81 deletions.
26 changes: 8 additions & 18 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,21 @@ 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.get('/', (req, res) => {
res.render('home', {
title: 'Welcome to Contoso!',
});
});

app.get('/who', (req, res) => {
res.render('who', {
title: 'Who We Are',
});
});

app.get('/contact', (req, res) => {
res.render('contact', {
title: 'Contact Us',
});
});
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}!`);
Expand Down
Loading

0 comments on commit f13eed9

Please sign in to comment.