S19: establish engineering repository

This commit is contained in:
2026-11-08 15:15:50 +01:00
commit c25ce11a1b
84 changed files with 6599 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
FROM node:24-alpine AS build
WORKDIR /workspace
COPY . .
RUN npm ci && npm run lint && npm test && npm run build
FROM nginxinc/nginx-unprivileged:1.28-alpine AS runtime
EXPOSE 8080
FROM runtime AS prebuilt
COPY dist/ /usr/share/nginx/html/
FROM runtime AS standalone
COPY --from=build /workspace/dist/ /usr/share/nginx/html/

View File

@@ -0,0 +1,3 @@
import { mkdir, copyFile } from 'node:fs/promises';
await mkdir('dist', { recursive: true });
await copyFile('index.html', 'dist/index.html');

View File

@@ -0,0 +1 @@
<!doctype html><html lang="en"><meta charset="utf-8"><title>@PROJECT@</title><h1>@PROJECT@</h1></html>

View File

@@ -0,0 +1 @@
{"name":"@PROJECT@-frontend","version":"1.0.0","lockfileVersion":3,"requires":true,"packages":{"":{"name":"@PROJECT@-frontend","version":"1.0.0"}}}

View File

@@ -0,0 +1,4 @@
{
"name": "@PROJECT@-frontend", "version": "1.0.0", "private": true,
"scripts": {"lint": "node --check build.mjs", "test": "node --test test.mjs", "build": "node build.mjs"}
}

View File

@@ -0,0 +1,4 @@
import { test } from 'node:test';
import { readFile } from 'node:fs/promises';
import assert from 'node:assert/strict';
test('starter page identifies the project', async () => { assert.match(await readFile('index.html', 'utf8'), /@PROJECT@/); });