Skip to content

Instantly share code, notes, and snippets.

@marcuswestin
Created May 17, 2011 03:25
Show Gist options
  • Save marcuswestin/975866 to your computer and use it in GitHub Desktop.
Save marcuswestin/975866 to your computer and use it in GitHub Desktop.
Little require server
var port = 8080
require('require/server').mount(require('http').createServer(function(req, res) {
if (req.url == '/') {
res.end('<body><script src="/require/little_client"></script></body>')
}
}), { port:port }).listen(port)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment