Spaces:
Sleeping
Sleeping
Upload 8 files
Browse files- package-lock.json +7 -0
- package.json +1 -0
- public/index.js +1 -1
- server.js +1 -0
package-lock.json
CHANGED
|
@@ -11,6 +11,7 @@
|
|
| 11 |
"dependencies": {
|
| 12 |
"@mercuryworkshop/bare-mux": "^2.1.8",
|
| 13 |
"@titaniumnetwork-dev/ultraviolet": "^3.2.10",
|
|
|
|
| 14 |
"@tomphttp/bare-server-node": "^2.0.6",
|
| 15 |
"express": "^5.2.1"
|
| 16 |
}
|
|
@@ -35,6 +36,12 @@
|
|
| 35 |
"set-cookie-parser": "^2.7.1"
|
| 36 |
}
|
| 37 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
"node_modules/@tomphttp/bare-server-node": {
|
| 39 |
"version": "2.0.6",
|
| 40 |
"resolved": "https://registry.npmjs.org/@tomphttp/bare-server-node/-/bare-server-node-2.0.6.tgz",
|
|
|
|
| 11 |
"dependencies": {
|
| 12 |
"@mercuryworkshop/bare-mux": "^2.1.8",
|
| 13 |
"@titaniumnetwork-dev/ultraviolet": "^3.2.10",
|
| 14 |
+
"@tomphttp/bare-client": "^2.2.0-alpha",
|
| 15 |
"@tomphttp/bare-server-node": "^2.0.6",
|
| 16 |
"express": "^5.2.1"
|
| 17 |
}
|
|
|
|
| 36 |
"set-cookie-parser": "^2.7.1"
|
| 37 |
}
|
| 38 |
},
|
| 39 |
+
"node_modules/@tomphttp/bare-client": {
|
| 40 |
+
"version": "2.2.0-alpha",
|
| 41 |
+
"resolved": "https://registry.npmjs.org/@tomphttp/bare-client/-/bare-client-2.2.0-alpha.tgz",
|
| 42 |
+
"integrity": "sha512-xhcflOpwr92tkpp8SoDhB3nK3LHMBIjx+vgow37XobQew2k0/mXSxmaU7BsDFpOIa1CcLCEsR8gWn0v7Cy9+7Q==",
|
| 43 |
+
"license": "LGPL-3.0"
|
| 44 |
+
},
|
| 45 |
"node_modules/@tomphttp/bare-server-node": {
|
| 46 |
"version": "2.0.6",
|
| 47 |
"resolved": "https://registry.npmjs.org/@tomphttp/bare-server-node/-/bare-server-node-2.0.6.tgz",
|
package.json
CHANGED
|
@@ -14,6 +14,7 @@
|
|
| 14 |
"dependencies": {
|
| 15 |
"@mercuryworkshop/bare-mux": "^2.1.8",
|
| 16 |
"@titaniumnetwork-dev/ultraviolet": "^3.2.10",
|
|
|
|
| 17 |
"@tomphttp/bare-server-node": "^2.0.6",
|
| 18 |
"express": "^5.2.1"
|
| 19 |
}
|
|
|
|
| 14 |
"dependencies": {
|
| 15 |
"@mercuryworkshop/bare-mux": "^2.1.8",
|
| 16 |
"@titaniumnetwork-dev/ultraviolet": "^3.2.10",
|
| 17 |
+
"@tomphttp/bare-client": "^2.2.0-alpha",
|
| 18 |
"@tomphttp/bare-server-node": "^2.0.6",
|
| 19 |
"express": "^5.2.1"
|
| 20 |
}
|
public/index.js
CHANGED
|
@@ -26,7 +26,7 @@ form.addEventListener('submit', async (e) => {
|
|
| 26 |
try {
|
| 27 |
const { BareMuxConnection } = await import('/baremux/index.mjs');
|
| 28 |
const connection = new BareMuxConnection("/baremux/worker.js");
|
| 29 |
-
await connection.setTransport("/
|
| 30 |
} catch (e) {
|
| 31 |
console.log("BareMux init info:", e);
|
| 32 |
}
|
|
|
|
| 26 |
try {
|
| 27 |
const { BareMuxConnection } = await import('/baremux/index.mjs');
|
| 28 |
const connection = new BareMuxConnection("/baremux/worker.js");
|
| 29 |
+
await connection.setTransport("/bareclient/index.js", ["/bare/"]);
|
| 30 |
} catch (e) {
|
| 31 |
console.log("BareMux init info:", e);
|
| 32 |
}
|
server.js
CHANGED
|
@@ -14,6 +14,7 @@ const app = express();
|
|
| 14 |
app.use(express.static(join(__dirname, 'public')));
|
| 15 |
app.use('/uv/', express.static(uvPath));
|
| 16 |
app.use('/baremux/', express.static(join(__dirname, 'node_modules', '@mercuryworkshop', 'bare-mux', 'dist')));
|
|
|
|
| 17 |
|
| 18 |
app.use((req, res) => {
|
| 19 |
res.status(404).sendFile(join(__dirname, 'public', 'index.html'));
|
|
|
|
| 14 |
app.use(express.static(join(__dirname, 'public')));
|
| 15 |
app.use('/uv/', express.static(uvPath));
|
| 16 |
app.use('/baremux/', express.static(join(__dirname, 'node_modules', '@mercuryworkshop', 'bare-mux', 'dist')));
|
| 17 |
+
app.use('/bareclient/', express.static(join(__dirname, 'node_modules', '@tomphttp', 'bare-client', 'dist')));
|
| 18 |
|
| 19 |
app.use((req, res) => {
|
| 20 |
res.status(404).sendFile(join(__dirname, 'public', 'index.html'));
|