Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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()
.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);
@mattvvhat

:+1:

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
Something went wrong with that request. Please try again.