Skip to content

Commit ad55a71

Browse files
author
codingChewie
committed
Using Pug in Your Express App
1 parent 644bb2b commit ad55a71

File tree

4 files changed

+463
-8
lines changed

4 files changed

+463
-8
lines changed

app.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ const express = require('express')
22

33
const app = express()
44

5+
app.set('view engine', 'pug')
6+
57
app.get('/', (req, res) => {
6-
res.send('<h1>Home page</h1>')
8+
res.render('index')
79
})
810

911
app.get('/hello', (req, res) => {

0 commit comments

Comments
 (0)