Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Using restify with connect
// Restify server config here
var server = restify.createServer({
name: 'restify-test',
version: '1.0.0',
// ...
// Connect config here
var connectApp = connect()
// And this is where the magic happens
.use("/api", function (req, res) {
server.server.emit('request', req, res);


Really helped some standalone development of a feature! (Mocked out a backend via grunt-contrib-connect + this middleware)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment