NodeJs giving me error when trying to start
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);