Mohamed Abu Basith commited on
Commit
b63c511
·
1 Parent(s): d3ef9f6

health check

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. server.js +3 -1
Dockerfile CHANGED
@@ -18,5 +18,5 @@ RUN npm ci --only=production
18
  # Copy the rest of your application code
19
  COPY . .
20
 
21
- EXPOSE 4000
22
  CMD ["node", "server.js"]
 
18
  # Copy the rest of your application code
19
  COPY . .
20
 
21
+ EXPOSE 7000
22
  CMD ["node", "server.js"]
server.js CHANGED
@@ -12,10 +12,12 @@ app.use(cors())
12
 
13
  dbConnection();
14
 
15
- const port = 4000;
16
  app.use(express.json());
17
  app.use(morgan("dev"));
18
  app.use(express.static("uploads"));
19
 
20
  bootstrap(app);
21
  app.listen(process.env.PORT || port, () => console.log(`Example app listening on port ${port}!`));
 
 
 
12
 
13
  dbConnection();
14
 
15
+ const port = 7000;
16
  app.use(express.json());
17
  app.use(morgan("dev"));
18
  app.use(express.static("uploads"));
19
 
20
  bootstrap(app);
21
  app.listen(process.env.PORT || port, () => console.log(`Example app listening on port ${port}!`));
22
+
23
+ app.get('/health', (req, res) => res.status(200).send('OK'));