2023-07-02 15:51:49 +02:00

12 lines
280 B
TypeScript

import { ExpressPeerServer } from "peer";
import * as express from "express";
const app = express();
const server = app.listen(5000);
const peerServer = ExpressPeerServer(server, {
path: "/",
});
app.use("/peerjs", peerServer as any);
app.use("/", express.static("public"));