Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
ec67d8283f
|
|||
|
0956a0ec73
|
+15
@@ -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"]
|
||||||
@@ -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}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user