1.0.2 • Published 1 year ago

local-redirector v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

local-redirector

NPM Version

local-redirector is a Node.js package that provides a simple command-line interface (CLI) to run a local HTTP proxy server. This tool streamlines development and testing workflows by allowing you to redirect local URLs to different target URLs.

Installation

Install globally using npm:

npm install -g local-redirector

Usage

To start the local proxy server, run:

local-redirector --target [TARGET_URL] --port [PORT_NUMBER]

Replace TARGET_URL: The URL you want to redirect requests to. PORT_NUMBER: The desired port number for the proxy server (defaults to 8888 if not specified).

Example:

local-redirector --target https://your-custom-api.com --port 3000

This command creates a local proxy server on port 3000 that redirects requests to your custom API endpoint https://your-custom-api.com. You can then access this API locally at http://{your_local_ip}:3000 from any device connected to your network.

Use Cases

  • Development: Test with different backend services locally.
  • Testing: Simulate various environments.
  • Debugging: Switch between target URLs easily.

Contributing

Feel free to contribute! Open an issue or submit a pull request on GitHub.

License

MIT License.

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago