Skip to content

Instantly share code, notes, and snippets.

@kidbrax
Last active April 27, 2020 15:27
Show Gist options
  • Select an option

  • Save kidbrax/e9c77c143bca23d769ab to your computer and use it in GitHub Desktop.

Select an option

Save kidbrax/e9c77c143bca23d769ab to your computer and use it in GitHub Desktop.

Revisions

  1. kidbrax renamed this gist Aug 27, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. kidbrax created this gist Aug 27, 2014.
    13 changes: 13 additions & 0 deletions demo
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    http = require("http")
    PORT = process.env.PORT or 3000

    http.createServer((req, res) ->
    console.log "%d request received", process.pid
    res.writeHead 200,
    "Content-Type": "text/plain"

    res.end "Hello world!\n"
    return
    ).listen PORT

    console.log "%d listening on %d", process.pid, PORT