File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -5,3 +5,14 @@ npm install
5
5
6
6
to run
7
7
node index.js
8
+ # Node.js Web Application
9
+
10
+ This is a Node.js web application.
11
+
12
+ ## Build and Run with Docker
13
+
14
+ 1 . Clone the repository:
15
+ ``` bash
16
+ git clone https://github.com/NEELOFARKHAN22/nodejsApp.git
17
+ cd nodejsApp
18
+
Original file line number Diff line number Diff line change
1
+ # Use an official Node.js base image
2
+ FROM node:14
3
+
4
+ # Set the working directory to /app
5
+ WORKDIR /app
6
+
7
+ # Copy the application code into the container
8
+ COPY . /app
9
+
10
+ # Install dependencies
11
+ RUN npm install
12
+
13
+ # Expose port 3000
14
+ EXPOSE 3000
15
+
16
+ # Use a non-root user to run the application
17
+ USER node
18
+
19
+ # Command to start the application
20
+ CMD ["npm", "start"]
21
+
Original file line number Diff line number Diff line change
1
+ Subproject commit 69e84ddd94151bae2c51e2f88c1275517e591ee6
You can’t perform that action at this time.
0 commit comments