Skip to content

Instantly share code, notes, and snippets.

View hartbit's full-sized avatar
👨‍💻
Swifting, one commit at a time

David Hart hartbit

👨‍💻
Swifting, one commit at a time
  • Atipik Sàrl & Witty Wings SA
  • Geneva, Switzerland
View GitHub Profile
@tbeseda
tbeseda / basic_auth_app.coffee
Created December 29, 2011 21:19
Basic HTTP Auth with Express for Node.js
express = require 'express'
app = express.createServer()
auth = express.basicAuth 'yourmom', 'p4ssw0rd'
app.get '/', auth, (req, res) ->
res.send your_super_secret_stuff
app.listen 3000, ->
console.log "Listening on #{port}"