add compression for stuff served via express
This commit is contained in:
parent
ede95ff16c
commit
e803945d23
7 changed files with 146 additions and 4 deletions
File diff suppressed because one or more lines are too long
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="UTF-8">
|
||||
|
||||
<title>🧩 jigsaw.hyottoko.club</title>
|
||||
<script type="module" crossorigin src="/assets/index.382b265e.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index.8f906b9e.js"></script>
|
||||
<link rel="modulepreload" href="/assets/vendor.b622ee49.js">
|
||||
<link rel="stylesheet" href="/assets/index.f7304069.css">
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import WebSocket from 'ws';
|
||||
import express from 'express';
|
||||
import compression from 'compression';
|
||||
import multer from 'multer';
|
||||
import fs from 'fs';
|
||||
import readline from 'readline';
|
||||
|
|
@ -1916,6 +1917,7 @@ const log = logger('main.js');
|
|||
const port = config.http.port;
|
||||
const hostname = config.http.hostname;
|
||||
const app = express();
|
||||
app.use(compression());
|
||||
const storage = multer.diskStorage({
|
||||
destination: UPLOAD_DIR,
|
||||
filename: function (req, file, cb) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue