Workstations Service

This commit is contained in:
Henrik Brüsecke 2026-08-29 18:18:56 +03:00
parent 9a2bd2bffd
commit ed13bec66f
6 changed files with 92 additions and 1 deletions

3
.gitignore vendored
View file

@ -1,3 +1,6 @@
# Backend
node_modules/
# MkDocs
/.cache/
/site/

View file

@ -0,0 +1,11 @@
added: "2026-08-22"
architectures:
- bitness: 64
cpu: x86
endianness: LE
family: Linux
name: Questing Quokka
origin: 🇬🇧
os: Ubuntu
version: "25.10"
year: 2025

40
backend/workstations/package-lock.json generated Normal file
View file

@ -0,0 +1,40 @@
{
"name": "workstations",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"js-yaml": "5.4.1"
}
},
"node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"license": "Python-2.0"
},
"node_modules/js-yaml": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.4.1.tgz",
"integrity": "sha512-28R/k+NAjeuf7+CKlTxWZVExJGwVVLwY06DgEnOMz2gEpfNkDcD7QvyiVPT0xy0XXhU8vHsd4Ot42OOPdJG7dQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/puzrin"
},
{
"type": "github",
"url": "https://github.com/sponsors/nodeca"
}
],
"license": "MIT",
"dependencies": {
"argparse": "^2.0.1"
},
"bin": {
"js-yaml": "bin/js-yaml.mjs"
}
}
}
}

View file

@ -0,0 +1,7 @@
{
"dependencies": {
"js-yaml": "5.4.1"
},
"private": true,
"type": "module"
}

View file

@ -0,0 +1,30 @@
import http from 'node:http';
const PORT = 50000;
const server = http.createServer(onRequest);
let isShuttingDown = false;
process.on('SIGINT', shutdown);
process.on('SIGTERM', shutdown);
server.listen(PORT);
console.log('Started server')
console.log(`Listening on port ${PORT}`);
function onRequest(_request, response) {
response.setHeader('Content-Type', 'application/json');
response.end(JSON.stringify({}));
}
function onServerClose() {
console.log('Server shutdown');
}
function shutdown() {
if (isShuttingDown) return;
console.log('Shutting down server');
isShuttingDown = true;
server.close(onServerClose);
}

View file

@ -23,8 +23,8 @@
<nav class="nav">
<a class="nav-link screen-narrow" href="https://code.instantworkstation.com">Code</a>
<a class="nav-link screen-wide" href="https://code.instantworkstation.com">Source Code</a>
<a class="nav-link screen-narrow" href="https://docs.instantworkstation.com">Docs</a>
<a class="nav-link screen-wide" href="https://code.instantworkstation.com">Source Code</a>
<a class="nav-link screen-wide" href="https://docs.instantworkstation.com">Technical Documentation</a>
<span class="news-ticker">