Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 682b932

Browse files
committed
update code example
1 parent a58fd15 commit 682b932

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ import { createServer } from "node:http";
4545
import { createProxyServer } from "@squarecloud/http-proxy";
4646

4747
const proxy = createProxyServer({});
48-
const target =
49-
"http://google.com/example"; /* address of your proxy server here */
48+
const target = "http://example.com"; /* address of your proxy server here */
5049

5150
const server = createServer(async (req, res) => {
5251
try {
@@ -58,9 +57,7 @@ const server = createServer(async (req, res) => {
5857
}
5958
});
6059

61-
server.listen(80, () =>
62-
console.log("Proxy is listening on http://localhost:80"),
63-
);
60+
server.listen(80, () => console.log("Proxy is listening on http://localhost"));
6461
```
6562

6663
Checkout [http-party/node-http-proxy](https://github.com/http-party/node-http-proxy) for more options and examples.

0 commit comments

Comments
 (0)