Skip to content

Instantly share code, notes, and snippets.

@groundwater
Last active December 29, 2015 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save groundwater/7620227 to your computer and use it in GitHub Desktop.
Save groundwater/7620227 to your computer and use it in GitHub Desktop.

Overview

A fully transparent http proxy that can be used to swap out npm packages on the fly.

Configuration

Environment

UPSTREAM_HOST=http://api.npmjs.org/
ADMIN_USER=bob
ADMIN_AUTH=i am awesome
VARDIR=/home/fproxy/data
TMPDIR=/tmp/fproxy

Usage

Usage: fproxy CMD $PAYLOAD [$PATH]
  
  Arguments
  
    $PAYLOAD  the local file system path to the object 
              you wish to store in the proxy
    $PATH     the path to proxy on the server
              defaults to $PAYLOAD
  
  Commands
  
    put       put a new payload into the proxy cache
    del       remove a payload from the proxy cache
  
  Options
  
    -c --content-type TYPE     set content type header
    -e --encoding TYPE         set encoding header
    -H --header HEADER         set a generic header
    -x --expire DURATION       expire cache after DURATION
  
  Environment
  
    FPROXY_HOST   proxy hostname
    FPROXY_PORT   proxy port       (default 80)
    FPROXY_USER   proxy user name
    FPROXY_AUTH   proxy authentication token

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