Professional Documents
Culture Documents
WEB - 14 View Engine
WEB - 14 View Engine
Server
• ROUTES: app.get, app.put, app.post, app.delete HTML
• REQUEST: req.query, req.params, req.body
• RESPONSE: res.send, res.render JSON
Response Methods
ExpressJS
Handlebars JS
res.render(‘index’);
Partials
views/layouts/main.hbs
views/index.hbs
res.render(‘index’);
{{> header}}
{{> footer}}
Expression
Condition (if)
Condition (unless)
Iteration (each)
HTML Escape
HTML Escape Output
With
With Output
Comment