If you’re working with TypeScript, ts-node + http-proxy is a solid combo. The docs are meh, but this setup works:
```typescript
import * as httpProxy from 'http-proxy';
const proxy = httpProxy.createProxyServer();
server.use('/path', (req, res) => proxy.web(req, res, { target: 'http://target' }));
```
Pro tip: Always log errors. Proxy fails silently way too often.
```typescript
import * as httpProxy from 'http-proxy';
const proxy = httpProxy.createProxyServer();
server.use('/path', (req, res) => proxy.web(req, res, { target: 'http://target' }));
```
Pro tip: Always log errors. Proxy fails silently way too often.
