Skip to content

Commit 502a791

Browse files
added correct server file
1 parent 46dfc74 commit 502a791

File tree

436 files changed

+62301
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

436 files changed

+62301
-1
lines changed

Dockerfile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Use an official Node.js runtime as the base image
2+
FROM node:14
3+
4+
# Set the working directory in the container
5+
WORKDIR /app
6+
7+
# Copy package.json and package-lock.json to the working directory
8+
COPY package*.json ./
9+
10+
# Install project dependencies
11+
RUN npm install
12+
13+
# Copy the application code to the working directory
14+
COPY . .
15+
16+
# Expose the port on which the server is listening
17+
EXPOSE 3000
18+
19+
# Start the server
20+
CMD [ "node", "app.js" ]

app.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const express = require('express');
2+
const app = express();
3+
4+
app.get('/', (req, res) => {
5+
res.send('Hello, World!');
6+
});
7+
8+
const port = process.env.PORT || 3000;
9+
app.listen(port, () => {
10+
console.log(`Server running on port ${port}`);
11+
});

node_modules/.bin/mime

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)