Skip to content

Instantly share code, notes, and snippets.

@gh640
Created June 2, 2020 01:02
Show Gist options
  • Select an option

  • Save gh640/c542ee1d4f696695aa30aa677902bc43 to your computer and use it in GitHub Desktop.

Select an option

Save gh640/c542ee1d4f696695aa30aa677902bc43 to your computer and use it in GitHub Desktop.
プロキシサーバーを走らせる
// プロキシサーバーを走らせる
//
// - 80 ポートへのリクエストを 8000 に流す例
// - `npm i http-proxy` を実行後にこのスクリプトを実行する
//
// See: https://github.com/http-party/node-http-proxy
var httpProxy = require('http-proxy');
console.log('Runninng on port 80...');
httpProxy.createProxyServer({target: 'http://localhost:8000'}).listen(80);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment