test(ci): add watch paths phase 4 fixture

This commit is contained in:
2026-11-17 05:00:23 +00:00
parent 0b0c0dabee
commit 70cdf742aa
12 changed files with 107 additions and 38 deletions

14
web/Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM docker.io/library/node:22-alpine
WORKDIR /app
ENV NODE_ENV=production
COPY --chown=node:node package.json package-lock.json ./
COPY --chown=node:node packages/shared/package.json ./packages/shared/
COPY --chown=node:node healthcare-miniapp/package.json ./healthcare-miniapp/
COPY --chown=node:node web/package.json ./web/
RUN npm ci --omit=dev
COPY --chown=node:node packages/shared ./packages/shared
COPY --chown=node:node web ./web
WORKDIR /app/web
USER node
EXPOSE 8080
CMD ["npm", "start"]

11
web/package.json Normal file
View File

@@ -0,0 +1,11 @@
{
"name": "watch-paths-fixture-web",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "node server.js"
},
"dependencies": {
"watch-paths-fixture-shared": "file:../packages/shared"
}
}

11
web/server.js Normal file
View File

@@ -0,0 +1,11 @@
const http = require("node:http");
const { fixtureName } = require("watch-paths-fixture-shared");
const server = http.createServer((request, response) => {
response.setHeader("Content-Type", "application/json");
if (request.url === "/health") {
response.writeHead(200).end(JSON.stringify({ status: "ok", service: "web", fixtureName }));
return;
}
response.writeHead(200).end(JSON.stringify({ service: "web", fixtureName }));
});
server.listen(8080, "0.0.0.0");