https://github.com/zaaack/node-proxy-dev
a proxy server wrapper for front end development, easy to modify or replace remote files
https://github.com/zaaack/node-proxy-dev
Last synced: about 1 year ago
JSON representation
a proxy server wrapper for front end development, easy to modify or replace remote files
- Host: GitHub
- URL: https://github.com/zaaack/node-proxy-dev
- Owner: zaaack
- License: mit
- Created: 2015-11-10T05:33:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-14T09:35:54.000Z (over 10 years ago)
- Last Synced: 2025-05-10T01:07:18.197Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-proxy-dev
a proxy server wrapper for frontend development, easy to modify or replace remote files. Thanks for the great package [node-http-proxy](https://github.com/nodejitsu/node-http-proxy)
## INSTALL
```sh
npm i -g proxy-dev
```
## USAGE
You can use this package by cli parameters or config file, and use `pd` for shotcut of `proxy-dev`
### cli
like the example below, you start a proxy server and target to website `https://github.com`, `-o/--open` means auto open browser. you can use 'proxy-dev -h' to see all available options.
```sh
proxy-dev -t https://github.com -o
```
### config file
use 'proxy-dev -i' to generate a config file in current directory, it will be load automatically if it exists.
it's a js module file like below:
```js
module.exports = {
'target': 'https://yzhen123.github.io/',
'port': 8000,
replaceRules: [{
regex: /
(.*?)<\/p>/g,
replace: '
I have being replaced, plz go to real site
'
}],
rawMiddlewares: [function (rep, res, next) {
next()
}],
// custome confit for node-http-proxy, see https://github.com/nodejitsu/node-http-proxy
httpProxyConfig: { },
noCache: true,
open: true
}
```
## License
MIT