mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 14:54:05 -06:00
28 lines
389 B
Markdown
28 lines
389 B
Markdown
---
|
|
title: "11-mvc-model"
|
|
aliases:
|
|
tags:
|
|
- cosc203
|
|
- lecture
|
|
---
|
|
|
|

|
|
|
|
# view templates
|
|
## pug
|
|
pug is a view engine.
|
|
``` js
|
|
app.set('views', path.join(__dirname, 'views'))
|
|
app.set('view engine', 'pug')
|
|
```
|
|
|
|
a pug file
|
|
- defines an html template
|
|
|
|
e.g.,
|
|
``` pug
|
|
doctype html
|
|
head
|
|
title mytitle
|
|
script(type="text/javascript")
|
|
``` |