If you are building a Whop app inside of our website, you can use this proxy to run your local setup inside of a Whop iFrame. You can use this proxy with any application written in any language, not just javascript.

Install

pnpm add @whop-apps/dev-proxy

Run

pnpm whop-proxy

If you are using NPM, you need to add "whop-proxy": "whop-proxy" to the scripts section of your package.json file.

If you are running a running any app with a pnpm dev script:

If you are using NPM, you need to add "whop-proxy": "whop-proxy" to the scripts section of your package.json file.

pnpm whop-proxy

If you are running an app that does not have a pnpm dev script, for example, a Ruby on Rails app on port 3001:

pnpm whop-proxy --proxyPort=3000 --upstreamPort=3001 --command="sleep 3d"

Configure

The proxy can be configured using the following command line options:

Usage: pnpm whop-proxy [options]

Options:

--proxyPort <port>      The port the proxy should listen on (3000 by default)
--upstreamPort <port>   The port the upstream server is listening on (set automatically by default)
--npmCommand <command>  The npm command to run to start the upstream server (dev by default)
--command <command>     The command to run to start the upstream server (npm run dev by default)