Remove dev server
This commit is contained in:
parent
8841784cae
commit
70737f0a00
4 changed files with 1 additions and 1124 deletions
|
@ -4,7 +4,7 @@ Testbed for full mesh video chat.
|
||||||
|
|
||||||
## Getting Started
|
## 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:
|
Then install the dependencies:
|
||||||
|
|
||||||
|
|
1074
package-lock.json
generated
1074
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -7,7 +7,6 @@
|
||||||
"serve": "vite preview"
|
"serve": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"buffer": "^6.0.3",
|
|
||||||
"events": "^3.3.0",
|
"events": "^3.3.0",
|
||||||
"matrix-js-sdk": "^12.0.1",
|
"matrix-js-sdk": "^12.0.1",
|
||||||
"react": "^17.0.0",
|
"react": "^17.0.0",
|
||||||
|
@ -16,8 +15,6 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-react-refresh": "^1.3.1",
|
"@vitejs/plugin-react-refresh": "^1.3.1",
|
||||||
"express": "^4.17.1",
|
|
||||||
"http2-proxy": "^5.0.53",
|
|
||||||
"vite": "^2.4.2"
|
"vite": "^2.4.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
46
server.js
46
server.js
|
@ -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));
|
|
Loading…
Reference in a new issue