Skip to content

Instantly share code, notes, and snippets.

@nodokodo
Forked from jmibanez/gist:2140974
Created March 6, 2013 21:53
Show Gist options
  • Save nodokodo/5103434 to your computer and use it in GitHub Desktop.
Save nodokodo/5103434 to your computer and use it in GitHub Desktop.
// Restify server config here
var server = restify.createServer({
name: 'restify-test',
version: '1.0.0',
});
// ...
// Connect config here
var connectApp = connect()
.use(connect.logger())
.use(connect.bodyParser())
.use(connect.query())
.use(connect.cookieParser())
// And this is where the magic happens
.use("/api", function (req, res) {
server.server.emit('request', req, res);
});
connectApp.listen(8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment