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

@@ -14,7 +14,6 @@ COPY . .
RUN npx tsc && npm run-script build && \
npm ci --only=production && \
ln -sf /usr/share/fonts assets/ && \
chown -R node .
FROM base AS deploy
@@ -23,12 +22,12 @@ ARG version=develop
ARG githash=REVISION
ARG created=CREATED
LABEL org.opencontainers.image.title="nodejs-web-template"
LABEL org.opencontainers.image.description="Template for my nodejs web projects"
LABEL org.opencontainers.image.title="madisonlinux"
LABEL org.opencontainers.image.description="Website for upcoming Linux install party in Madison WI"
LABEL org.opencontainers.image.authors="Cory Sanin <corysanin@outlook.com>"
LABEL org.opencontainers.image.url="https://git.sanin.dev/corysanin/nodejs-web-template"
LABEL org.opencontainers.image.documentation="https://git.sanin.dev/corysanin/nodejs-web-template"
LABEL org.opencontainers.image.source="https://git.sanin.dev/corysanin/nodejs-web-template"
LABEL org.opencontainers.image.url="https://git.sanin.dev/corysanin/madisonlinux"
LABEL org.opencontainers.image.documentation="https://git.sanin.dev/corysanin/madisonlinux"
LABEL org.opencontainers.image.source="https://git.sanin.dev/corysanin/madisonlinux"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.version="${version}"
LABEL org.opencontainers.image.revision="${githash}"

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Cory Sanin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

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}`));
}