Skip to content

Instantly share code, notes, and snippets.

@soner8
Created March 20, 2018 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soner8/c6af0f5100ab7ae6502ebf2aad850f41 to your computer and use it in GitHub Desktop.
Save soner8/c6af0f5100ab7ae6502ebf2aad850f41 to your computer and use it in GitHub Desktop.
Layout
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { title: 'Express' });
});
router.get('/coucou-pug', function(req, res) {
res.render('layout', { sayHello: 'Hello buddy' });
});
module.exports = router;
html
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
body
block content
h1=sayHello
include includes/header.pug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment