Compare commits

...

2 Commits

Author SHA1 Message Date
herel ec67d8283f chore: add Dockerfile 2025-05-02 16:29:42 +02:00
herel 0956a0ec73 fix: add /health route 2025-05-02 16:29:32 +02:00
2 changed files with 19 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
FROM node@sha256:86703151a18fcd06258e013073508c4afea8e19cd7ed451554221dd00aea83fc
WORKDIR /usr/src/app
EXPOSE 3000
COPY package.json /usr/src/app/package.json
RUN npm install
USER node
COPY . /usr/src/app/
CMD ["npm", "start"]
+4
View File
@@ -27,6 +27,10 @@ app.get('/no', (req, res) => {
res.json({ reason }); res.json({ reason });
}); });
app.get('/health', (req, res) => {
res.json({"status": "ok"});
});
// Start server // Start server
app.listen(PORT, () => { app.listen(PORT, () => {
console.log(`No-as-a-Service is running on port ${PORT}`); console.log(`No-as-a-Service is running on port ${PORT}`);