You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
381 B

3 years ago
  1. const { createProxyMiddleware } = require("http-proxy-middleware");
  2. const express = require('express');
  3. const PORT = 8080;
  4. console.log(`Starting Proxy on port ${PORT}`);
  5. const app = express();
  6. app.use(createProxyMiddleware({ target: "http://localhost:8081", changeOrigin: true, ws: true }));
  7. app.listen(PORT, () => {
  8. console.log(`Started on http://localhost:${PORT}`);
  9. });