File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 --health-timeout 5s
2424 --health-retries 5
2525
26- strategy :
27- matrix :
28- node-version : [22.x, 24.x]
26+ # Uncomment the following lines to run tests on multiple Node.js versions
27+ # strategy:
28+ # matrix:
29+ # node-version: [22.x, 24.x]
2930
3031 steps :
3132 - name : Checkout code to runner
3435 - name : Set up Node.js
3536 uses : actions/setup-node@v2
3637 with :
37- node-version : " ${{ matrix.node-version }} "
38+ node-version : " 22 "
3839
3940 - name : Install dependencies
4041 run : npm install
Original file line number Diff line number Diff line change @@ -5,19 +5,18 @@ WORKDIR /app
55
66# Set environment variables for the application
77ENV PORT=80
8+ ENV NODE_ENV=production
89
910# Copy package.json and Prisma schema files to the container
1011COPY package*.json ./
11- COPY prisma ./
12+ COPY prisma ./prisma/
1213
13- RUN npm install
14+ # Install dependencies and generate Prisma client
15+ RUN npm ci --only=production && npx prisma generate
1416
1517# Copy the rest of the application code
1618COPY . .
1719
18- # Validate the Prisma schema and generate the Prisma client
19- RUN npx prisma generate
20-
2120# Expose the application port
2221EXPOSE 80
2322
Original file line number Diff line number Diff line change @@ -63,6 +63,10 @@ <h2>Welcome to the Express Server</h2>
6363 < p > < span class ="bold "> DELETE</ span > /api/users/:id - Delete a specific user by ID.</ p >
6464 < p > < span class ="bold "> GET</ span > /health - Check the health status of the server.</ p >
6565 </ div >
66+ < p style ="width: 600px;font-size: 13px;padding-top: 20px; ">
67+ Click the button below to check the health of the server. It will redirect you to the /health endpoint where
68+ you can see the server status and latest update information.
69+ </ p >
6670 < button onclick ="window.location.href='/health' "
6771 style ="background-color: #212121;color: #ffff; outline: none; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; margin-top: 20px; ">
6872 Check server health
You can’t perform that action at this time.
0 commit comments