node-http-proxy icon indicating copy to clipboard operation
node-http-proxy copied to clipboard

NodeJs giving me error when trying to start

Open DNAScanner opened this issue 3 years ago • 0 comments
trafficstars

Helo, When im trying to start my server by doing httpProxy.createProxyServer(), im just getting the error TypeError: httpProxy.createProxyServer is not a function I have the http-proxy-module installed (npm I http-proxy), so that probably is not the issues

http-proxy version: 1.18.1 nodejs version: v18.10.0

Code:

import * as http from "http";
import * as fs from "fs";
import * as path from "path";
import * as httpProxy from "http-proxy";

// Create a proxy server
const proxy = httpProxy.createProxyServer({
      target: "https://discord.gg"
}).listen(80);

DNAScanner avatar Oct 08 '22 14:10 DNAScanner