Remove dev server

This commit is contained in:
Robert Long 2021-07-26 15:11:28 -07:00
parent 8841784cae
commit 70737f0a00
4 changed files with 1 additions and 1124 deletions

View file

@ -4,7 +4,7 @@ Testbed for full mesh video chat.
## Getting Started
You must first run a local Synapse server on port 8080
You must first run a local Synapse server on port 8008
Then install the dependencies:

1074
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -7,7 +7,6 @@
"serve": "vite preview"
},
"dependencies": {
"buffer": "^6.0.3",
"events": "^3.3.0",
"matrix-js-sdk": "^12.0.1",
"react": "^17.0.0",
@ -16,8 +15,6 @@
},
"devDependencies": {
"@vitejs/plugin-react-refresh": "^1.3.1",
"express": "^4.17.1",
"http2-proxy": "^5.0.53",
"vite": "^2.4.2"
}
}

View file

@ -1,46 +0,0 @@
const express = require("express");
const { createServer: createViteServer } = require("vite");
const proxy = require("http2-proxy");
async function createServer() {
const app = express();
app.use("/_matrix*", (req, res, next) => {
proxy.web(
req,
res,
{
hostname: "localhost",
port: 8008,
},
(err) => {
if (err) {
console.error(
`Error http://localhost:3000${req.originalUrl} -> http://localhost:8008${req.originalUrl}`,
err
);
next(err);
} else {
console.log(
`http://localhost:3000${req.originalUrl} -> http://localhost:8008${req.originalUrl}`
);
}
}
);
});
// Create vite server in middleware mode.
const vite = await createViteServer({
server: { middlewareMode: "html" },
});
// Use vite's connect instance as middleware
app.use(vite.middlewares);
app.listen(3000);
}
createServer()
.then(() => {
console.log("Listening on http://localhost:3000");
})
.catch((err) => console.error(err));