Skip to content

Instantly share code, notes, and snippets.

@jashkenas
Created July 8, 2010 22:06
Show Gist options
  • Select an option

  • Save jashkenas/468726 to your computer and use it in GitHub Desktop.

Select an option

Save jashkenas/468726 to your computer and use it in GitHub Desktop.
# Create the web server.
server: http.createServer (req, res) ->
params: url.parse req.url, true
if params.pathname is '/pixel.gif'
res.writeHead 200, pixelHeaders
res.end pixel
else
res.writeHead 404, emptyHeaders
res.end ''
record params
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment