Created
April 22, 2018 17:50
-
-
Save Cynnah/823d6b981d5cfcafb1751fcfef450397 to your computer and use it in GitHub Desktop.
Pug quest
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
extends layout | |
block content | |
const = sayHello | |
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
<head> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
<h1> Hello everybody </h1> | |
</head> |
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", (req, res, next) => { | |
res.render("coucou", { sayHello: "hello Dude !!" }); | |
}); | |
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
doctype html | |
html | |
head | |
title= title | |
link(rel='stylesheet', href='/stylesheets/style.css') | |
body | |
include header.pug | |
block content |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment