This repository has been archived on 2024-08-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
khufu/server/index.js

10 lines
577 B
JavaScript

const express = require("express");
const { createProxyMiddleware } = require("http-proxy-middleware");
const port = process.env.PORT || 52026;
const cairoUrl = process.env.CAIRO_URL || "http://cairo.dunestorm.net:52000";
const nubianUrl = process.env.NUBIAN_URL || "http://nubian.dunestorm.net:52001";
const app = express();
app.use("/", express.static("build"));
app.use("/cairo", createProxyMiddleware({ target: cairoUrl }));
app.use("/nubian", createProxyMiddleware({ target: nubianUrl }));
app.listen(port, () => console.log(`🌴 Nile server started on ${port}! 🌴`));