Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

heroku-proxy

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heroku-proxy

a heroku proxy

  • 0.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
Maintainers
1
Weekly downloads
 
Created
Source

heroku-proxy

heroku-proxy provides an easy way to prototype web apps using the Heroku API and Heroku OAuth.

Setup

Create a new project and install it:

$ git init my-new-app
$ cd my-new-app
$ mkdir public
$ npm init
$ npm install heroku-proxy --save

Run the bootstrap:

$ ./node_modules/.bin/heroku-proxy

Require it in your index.js:

var proxy = require('heroku-proxy');
proxy();

Now, running foreman run nodemon index.js will serve content inside the public directory. Any calls to /api/* will be proxied through the Heroku API.

Options

By default, heroku-proxy will start a server for you. You can prevent that with the startServer option:

var proxy = require('heroku-proxy');

proxy({ startServer: false });

If you'd like to pass in your own express app, you can do that, as well:

var express = require('express');
var proxy   = require('heroku-proxy');
var app     = express();

proxy(app);

Keywords

FAQs

Package last updated on 25 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc