Setup deployment for Khufu

This commit is contained in:
Dunemask 2021-08-06 19:56:59 -06:00
parent 5d35d66713
commit 9bed3908d3
10 changed files with 101 additions and 39 deletions

10
server/main.js Normal file
View file

@ -0,0 +1,10 @@
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("/api/cairo", createProxyMiddleware({ target: cairoUrl }));
app.use("/api/nubian", createProxyMiddleware({ target: nubianUrl }));
app.listen(port, () => console.log(`🌴 Nile server started on ${port}! 🌴`));