mirror of
https://github.com/NebulaServices/Nebula.git
synced 2025-05-13 03:50:02 -04:00
Add UV
This commit is contained in:
parent
5ae0aad1d6
commit
3b00a749b5
13 changed files with 5887 additions and 2913 deletions
|
@ -1,6 +1,7 @@
|
|||
import express from "express";
|
||||
import { createServer } from "node:http";
|
||||
import path from "path";
|
||||
import wisp from "wisp-server-node";
|
||||
import { Sequelize, DataTypes } from "sequelize";
|
||||
import { fileURLToPath } from "url";
|
||||
import { handler as ssrHandler } from "./dist/server/entry.mjs";
|
||||
|
@ -176,6 +177,13 @@ server.on("request", (req, res) => {
|
|||
res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");
|
||||
app(req, res);
|
||||
});
|
||||
|
||||
server.on("upgrade", (req, socket, head) => {
|
||||
if (req.url.endsWith("/wisp/")) {
|
||||
wisp.routeRequest(req, socket, head);
|
||||
}
|
||||
})
|
||||
|
||||
server.listen({
|
||||
port: 8080,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue