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 | |
p Hello again World. | |
p The current date is: #{date} | |
p. | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod | |
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | |
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | |
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse |
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 html5 | |
html | |
head | |
title #{title} | |
link(rel="stylesheet", href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css") | |
body | |
div.container(style="max-width: 800px;") | |
h1 My sample app | |
block content |
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 app = express(); | |
// Jade | |
app.set('views', __dirname+'/views'); | |
app.set('view engine', 'jade'); | |
app.get('/', function(req, res){ | |
var name = req.query.name; | |
if (name == null) |
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
{ | |
"name": "MyApp", | |
"version": "0.0.1", | |
"private": true, | |
"dependencies": { | |
"express": "3.4.4", | |
"jade": "0.35.0" | |
} | |
} |
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 app = express(); | |
app.get('/', function(req, res){ | |
var name = req.query.name != null ? req.query.name : "World"; | |
res.send('Hello, '+name+'!'); | |
}); | |
app.listen(3333); | |
console.log('Running on port 3333!'); |
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
{ | |
"name": "MyApp", | |
"version": "0.0.1", | |
"private": true, | |
"dependencies": { | |
"express": "3.4.4" | |
} | |
} |
NewerOlder