Skip to content

Commit

Permalink
update code example
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoOtavioS committed Sep 27, 2023
1 parent a58fd15 commit 682b932
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ import { createServer } from "node:http";
import { createProxyServer } from "@squarecloud/http-proxy";

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

const server = createServer(async (req, res) => {
try {
Expand All @@ -58,9 +57,7 @@ const server = createServer(async (req, res) => {
}
});

server.listen(80, () =>
console.log("Proxy is listening on http://localhost:80"),
);
server.listen(80, () => console.log("Proxy is listening on http://localhost"));
```

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

0 comments on commit 682b932

Please sign in to comment.