Skip to content

Commit aa22feb

Browse files
committed
Add Fulmine.js server
1 parent 432c7eb commit aa22feb

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM node:22-trixie-slim
2+
# fulmine.js depends on uWebSockets.js, which npm installs from its git tag rather than from the
3+
# registry, and whose prebuilt binary needs glibc 2.38, which is why this is trixie and not the
4+
# bookworm -slim every other server here uses. git fetches it over https because npm asks for the
5+
# repository over ssh by default and this image carries no key.
6+
RUN apt-get update \
7+
&& apt-get install -y --no-install-recommends git ca-certificates \
8+
&& rm -rf /var/lib/apt/lists/* \
9+
&& git config --global url."https://github.com/".insteadOf ssh://git@github.com/
10+
WORKDIR /app
11+
COPY src/Servers/FulmineServer/package.json .
12+
# the version is pinned rather than ranged, since this repo does not keep lock files, and nothing
13+
# here needs an install script to run
14+
RUN npm install --omit=dev --ignore-scripts
15+
# ExpressServer's application, not a copy of it. Fulmine.js is a drop-in replacement for Express 5,
16+
# so the package is installed under the name "express" and the same file runs unchanged: what is
17+
# probed here is the same application as the Express row, with only the framework behind it swapped.
18+
COPY src/Servers/ExpressServer/server.js .
19+
USER node
20+
ENTRYPOINT ["node", "server.js", "8080"]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "fulmine-server",
3+
"private": true,
4+
"dependencies": {
5+
"express": "npm:fulmine.js@5.13.3"
6+
}
7+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"name": "Fulmine.js", "language": "JavaScript"}

0 commit comments

Comments
 (0)