fix build
All checks were successful
App Image CI / Build app image (push) Successful in 13s
NPM Audit Check / Check NPM audit (push) Successful in -2m11s

This commit is contained in:
2025-10-17 13:10:10 -05:00
parent 91b157055e
commit 2e20859580
3 changed files with 26 additions and 24 deletions

View File

@@ -1,8 +1,6 @@
import * as http from "http";
import crypto from 'crypto';
import express from 'express';
import session from 'express-session';
import ky from 'ky';
import bodyParser from 'body-parser';
import type { Express } from 'express';
@@ -44,18 +42,6 @@ class Web {
app.set('view engine', 'ejs');
app.set('view options', { outputFunctionName: 'echo' });
app.use('/assets', express.static('assets', { maxAge: '30 days' }));
app.use(session({
name: 'sessionId',
secret: sessionSecret,
resave: true,
saveUninitialized: false,
store: undefined,
cookie: {
maxAge: notStupidParseInt(process.env['COOKIETTL']) || 1000 * 60 * 60 * 24 * 30, // 30 days
httpOnly: true,
secure: !!options.secure
}
}));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use((_req, res, next) => {
@@ -84,10 +70,6 @@ class Web {
});
});
app.get('/ky', async (_, res) => {
res.send(await (await ky.get('https://sanin.dev')).text());
});
this._webserver = this.app.listen(this.port, () => console.log(`archery is running on port ${this.port}`));
}