Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcusbuffett/dev-forwarding-server
Split API and other requests to different ports
https://github.com/marcusbuffett/dev-forwarding-server
Last synced: 25 days ago
JSON representation
Split API and other requests to different ports
- Host: GitHub
- URL: https://github.com/marcusbuffett/dev-forwarding-server
- Owner: marcusbuffett
- Created: 2020-12-02T04:40:13.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-02T04:50:54.000Z (about 4 years ago)
- Last Synced: 2024-10-13T14:54:54.325Z (3 months ago)
- Language: Rust
- Size: 7.81 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dev-forwarding-server
[![Crates.io](https://img.shields.io/crates/v/dev-forwarding-server)](https://crates.io/crates/dev-forwarding-server)
Often when working on a web app I'll need to route `/api/*` requests to an API
server, and the rest to a web server. In production this is accomplished w/
kubernetes, cloudfront, etc, but in development I use this tool.
`dev-api-server` takes a port to run on, an API port, and a web port.## Installation
`cargo install dev-forwarding-server`
This will install the `dev-forwarding-server` binary.
## Usage
```bash
dev-forwarding-server --port 4300 --web-port 3000 --api-port 8000
```This will start up a server on port 4300, that will forward api requests to port
8000, and other requests to port 3000.## Helptext
```
USAGE:
dev-forwarding-server --api-port --web-port --portFLAGS:
-h, --help Prints help information
-V, --version Prints version informationOPTIONS:
-a, --api-port
-p, --port
-w, --web-port
```