Instantly share code, notes, and snippets.

@EvanHahn /app.js
Last active May 10, 2018

Embed
What would you like to do?
Do you love anime?
// Start Express
var express = require("express");
var app = express();
// Set the view directory to /views
app.set("views", __dirname + "/views");
// Let's use the Jade templating language
app.set("view engine", "jade");
// Do you love anime?
app.get("/", function(request, response) {
response.render("index", { message: "I love anime" });
});
// Start that server
app.listen(1337);
//- Put this in views/index.jade
doctype 5
html
body
h1 Hello, world!
p= message
{
"name": "i_love_anime",
"version": "0.1.0",
"author": "Evan Hahn",
"license": "WTFPL",
"dependencies": {
"express": "3.x",
"jade": "*"
}
}
@MohanL

This comment has been minimized.

Copy link

MohanL commented Jan 11, 2016

Great tutorial, except some parts are outdated.
in the index.jade, doctype 5 is deprecated, doctype html is working

@nicolas-tournier

This comment has been minimized.

Copy link

nicolas-tournier commented Mar 24, 2016

Great tutorial, thanks!

@holmberd

This comment has been minimized.

Copy link

holmberd commented May 2, 2016

Good tutorial, I'm feeling positive to go from Node.js into the world of Express, and that is always a good start.

@pilgrim011

This comment has been minimized.

Copy link

pilgrim011 commented Oct 30, 2016

One of the best tutorials on the Internet, thank you!

@chrisdemetriad

This comment has been minimized.

Copy link

chrisdemetriad commented Feb 22, 2017

3 years later, still one of the best Node/Express tutorials.

@orsh99

This comment has been minimized.

Copy link

orsh99 commented Feb 25, 2017

Really loved it. Thanks!

@wewark

This comment has been minimized.

Copy link

wewark commented Mar 21, 2017

It's 2017 and this tutorial is still awesome.

@MukulGupta1

This comment has been minimized.

Copy link

MukulGupta1 commented Mar 23, 2017

A very well-written and easy to understand tutorial.
Great job and thanks a lot :)

@GrannyCamper

This comment has been minimized.

Copy link

GrannyCamper commented Jun 9, 2017

Thank you, Im still learning. But hallo Express, here I come.

@william-xue

This comment has been minimized.

Copy link

william-xue commented Jun 20, 2017

棒棒哒

@sefields

This comment has been minimized.

Copy link

sefields commented Aug 29, 2017

Great tutorial that made me chuckle and learn at the same time–in the words of Owen Wilson, "wow"!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment