Centralize URL flow

This commit is contained in:
Dunemask 2021-08-14 21:48:46 -06:00
parent 5ebdbef674
commit 082f80ec9d
3 changed files with 10 additions and 5 deletions

View file

@ -1,6 +1,6 @@
const { createProxyMiddleware } = require("http-proxy-middleware");
const cairoUrl = process.env.CAIRO_URL || "http://cairo.dunestorm.net:52000";
const nubianUrl = process.env.NUBIAN_URL || "http://nubian.dunestorm.net:52001";
const cairoUrl = process.env.CAIRO_URL ?? "http://cairo.dunestorm.net:52000";
const nubianUrl = process.env.NUBIAN_URL ?? "http://nubian.dunestorm.net:52001";
module.exports = (app) => {
// Cairo Proxy
app.use("/cairo", createProxyMiddleware({ target: cairoUrl }));