a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
var connect = require('connect') | |
, proxy = require('http-proxy') | |
function redirect(loc) { | |
return connect.createServer(function(req, res){ | |
res.writeHead(301, { "Location": loc }); | |
res.end(); | |
}); | |
} |
To use this module, do require('readline')
.
Takes two streams and creates a readline interface. The completer
function is used for autocompletion. When given a substring, it returns [substr, completedStr]
. TODO: write some code to make sure I'm right.
createInterface
is commonly used with process.stdin
and
process.stdout
in order to accept user input: