From aa22febaac303e0ee1959819ed79c698c7b00a89 Mon Sep 17 00:00:00 2001 From: Nigro Simone Date: Tue, 18 Aug 2026 18:45:54 +0200 Subject: [PATCH] Add Fulmine.js server --- src/Servers/FulmineServer/Dockerfile | 20 ++++++++++++++++++++ src/Servers/FulmineServer/package.json | 7 +++++++ src/Servers/FulmineServer/probe.json | 1 + 3 files changed, 28 insertions(+) create mode 100644 src/Servers/FulmineServer/Dockerfile create mode 100644 src/Servers/FulmineServer/package.json create mode 100644 src/Servers/FulmineServer/probe.json diff --git a/src/Servers/FulmineServer/Dockerfile b/src/Servers/FulmineServer/Dockerfile new file mode 100644 index 0000000..dd5d87f --- /dev/null +++ b/src/Servers/FulmineServer/Dockerfile @@ -0,0 +1,20 @@ +FROM node:22-trixie-slim +# fulmine.js depends on uWebSockets.js, which npm installs from its git tag rather than from the +# registry, and whose prebuilt binary needs glibc 2.38, which is why this is trixie and not the +# bookworm -slim every other server here uses. git fetches it over https because npm asks for the +# repository over ssh by default and this image carries no key. +RUN apt-get update \ + && apt-get install -y --no-install-recommends git ca-certificates \ + && rm -rf /var/lib/apt/lists/* \ + && git config --global url."https://github.com/".insteadOf ssh://git@github.com/ +WORKDIR /app +COPY src/Servers/FulmineServer/package.json . +# the version is pinned rather than ranged, since this repo does not keep lock files, and nothing +# here needs an install script to run +RUN npm install --omit=dev --ignore-scripts +# ExpressServer's application, not a copy of it. Fulmine.js is a drop-in replacement for Express 5, +# so the package is installed under the name "express" and the same file runs unchanged: what is +# probed here is the same application as the Express row, with only the framework behind it swapped. +COPY src/Servers/ExpressServer/server.js . +USER node +ENTRYPOINT ["node", "server.js", "8080"] diff --git a/src/Servers/FulmineServer/package.json b/src/Servers/FulmineServer/package.json new file mode 100644 index 0000000..fb19c8f --- /dev/null +++ b/src/Servers/FulmineServer/package.json @@ -0,0 +1,7 @@ +{ + "name": "fulmine-server", + "private": true, + "dependencies": { + "express": "npm:fulmine.js@5.13.3" + } +} diff --git a/src/Servers/FulmineServer/probe.json b/src/Servers/FulmineServer/probe.json new file mode 100644 index 0000000..b529769 --- /dev/null +++ b/src/Servers/FulmineServer/probe.json @@ -0,0 +1 @@ +{"name": "Fulmine.js", "language": "JavaScript"}