fix: app.use -> get
This commit is contained in:
@@ -15,7 +15,7 @@ import path from "node:path"
|
|||||||
|
|
||||||
const app = express()
|
const app = express()
|
||||||
app.use('/', express.static(config.data_path + '/page_compiled'))
|
app.use('/', express.static(config.data_path + '/page_compiled'))
|
||||||
app.use('/uploaded_files/:hash', (req, res) => {
|
app.get('/uploaded_files/:hash', (req, res) => {
|
||||||
const hash = req.params.hash as string
|
const hash = req.params.hash as string
|
||||||
if (hash == null) {
|
if (hash == null) {
|
||||||
res.sendStatus(404)
|
res.sendStatus(404)
|
||||||
@@ -39,7 +39,7 @@ const httpServer: HttpServerLike = (
|
|||||||
http.createServer(app)
|
http.createServer(app)
|
||||||
)
|
)
|
||||||
const io = new SocketIo.Server(httpServer, {
|
const io = new SocketIo.Server(httpServer, {
|
||||||
|
maxHttpBufferSize: 1e9,
|
||||||
})
|
})
|
||||||
|
|
||||||
ApiManager.initServer(httpServer, io)
|
ApiManager.initServer(httpServer, io)
|
||||||
|
|||||||
Reference in New Issue
Block a user