Skip to content

Instantly share code, notes, and snippets.

@Cynnah
Created April 22, 2018 17:50
Show Gist options
  • Save Cynnah/823d6b981d5cfcafb1751fcfef450397 to your computer and use it in GitHub Desktop.
Save Cynnah/823d6b981d5cfcafb1751fcfef450397 to your computer and use it in GitHub Desktop.
Pug quest
extends layout
block content
const = sayHello
<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>
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;
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