relay_added

This commit is contained in:
Ваше Имя
2025-02-19 12:31:56 +05:00
parent aa98d03667
commit cb1a76d4c1
144 changed files with 229 additions and 9 deletions

View File

@ -2,9 +2,17 @@ require('dotenv').config()
const express = require('express')
const app = express()
var fs = require('fs');
var obj = JSON.parse(fs.readFileSync('./html/vars.json', 'utf8'));
const path = require('path')
const html = path.join(__dirname, '/html');
app.use(express.static(html))
console.log(obj["path"]);
app.use(obj["path"],express.static(html))
app.set('etag', false);
app.get(obj["path"], (req, res) => {
res.sendFile(__dirname + '/html/index.html');
})
const port = process.argv[2] || 8090;
const http = require("http").Server(app);
@ -12,6 +20,7 @@ const http = require("http").Server(app);
const maxHttpBufferSizeInMb = parseInt(process.env.MAX_HTTP_BUFFER_SIZE_MB || '1');
const io = require("socket.io")(http, {
maxHttpBufferSize: maxHttpBufferSizeInMb * 1024 * 1024,
path: obj["path"]+"socket.io"
});
let messageCache = [];
// default cache size to zero. override in environment