Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
88 lines (61 sloc) 1.8 KB

web application

start a project

$ mkdir foo
$ cd foo
$ npm init

building a web application from zero

  • http server
  • static files
  • routing
  • client vs server
  • rendering html
  • sorting hash
  • tween
  • database

http server

var http = require('http')
var server = http.createServer(function (req, res) {
  res.end('beep boop!\n')

Run this program with node:

$ node server.js

then in a browser open http://localhost:5000

static files: fs

using fs...

static files: ecstatic

using ecstatic...

routing: manually

doing routing manually with req.url

routing: routes

using the routes module

client-side, server-side




starter projects