-
-
Save misablaha/6669102 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, callback) -> | |
fs.readFile 'mrdka', 'utf-8', (err, data) -> | |
return callback err if err | |
res.end data | |
app.get '/b', (req, res, callback) -> | |
fs.readFile 'index.coffee', 'utf-8', $ callback, (data) => | |
callback null, response | |
app.listen 5005 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment