Created
March 20, 2018 08:56
-
-
Save soner8/c6af0f5100ab7ae6502ebf2aad850f41 to your computer and use it in GitHub Desktop.
Layout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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