Skip to content

Instantly share code, notes, and snippets.

@camshaft
Created February 21, 2013 23:29
Show Gist options
  • Save camshaft/5009425 to your computer and use it in GitHub Desktop.
Save camshaft/5009425 to your computer and use it in GitHub Desktop.
simple-http-proxy usage
/**
* Module deps
*/
var express = require("express")
, proxy = require("simple-http-proxy");
var app = module.exports = express();
app.configure(function() {
app.use(express.logger("dev"));
app.use("/my-path", proxy("https://example.com/server-path"));
app.use(app.router);
});
// -> GET /my-path
// <- Response from https://example.com/server-path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment