Created
September 18, 2013 13:12
-
-
Save falsecz/6608955 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ = (next, success) => (err) => | |
return next err if err | |
args = Array::slice.call arguments, 1 | |
success.apply success, args | |
express = require 'express' | |
fs = require 'fs' | |
app = express() | |
app.get '/a', (req, res, next) -> | |
fs.readFile 'mrdka', 'utf-8', (err, data) -> | |
return next err if err | |
res.end data | |
app.get '/b', (req, res, next) -> | |
fs.readFile 'index.coffee', 'utf-8', $ next, (data) => | |
res.end data | |
app.listen 5005 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment