Skip to content

Latest commit

 

History

History
87 lines (61 loc) · 1.8 KB

webapp.markdown

File metadata and controls

87 lines (61 loc) · 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')
})
server.listen(5000)

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


browserify


virtual-dom


database


starter projects