Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DockerContainerizationProject
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fionn McGoldrick
DockerContainerizationProject
Commits
6a47d719
Commit
6a47d719
authored
3 months ago
by
Fionn
Browse files
Options
Downloads
Patches
Plain Diff
Docker file added.server.js file added and can be called with node server.js.
parent
a70ed8f1
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Dockerfile.txt
+18
-0
18 additions, 0 deletions
Dockerfile.txt
backend/package.json
+2
-1
2 additions, 1 deletion
backend/package.json
backend/server.js
+1
-0
1 addition, 0 deletions
backend/server.js
frontend/index.html
+1
-1
1 addition, 1 deletion
frontend/index.html
with
22 additions
and
2 deletions
Dockerfile.txt
0 → 100644
+
18
−
0
View file @
6a47d719
# Start from the official Node.js image
FROM node:18
# Set the working directory in the container
WORKDIR /app
# Copy package.json and install dependencies
COPY package*.json ./
RUN npm install
# Copy the rest of your app (code + frontend files)
COPY . .
# Expose the port your app runs on
EXPOSE 3000
# Start the server
CMD ["npm", "start"]
This diff is collapsed.
Click to expand it.
backend/package.json
+
2
−
1
View file @
6a47d719
...
...
@@ -4,7 +4,8 @@
"description"
:
""
,
"main"
:
"index.js"
,
"scripts"
:
{
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
,
"start"
:
"node server.js"
},
"keywords"
:
[],
"author"
:
""
,
...
...
This diff is collapsed.
Click to expand it.
backend/server.js
0 → 100644
+
1
−
0
View file @
6a47d719
console
.
log
(
"
Hello from server.js
"
);
\ No newline at end of file
This diff is collapsed.
Click to expand it.
frontend/index.html
+
1
−
1
View file @
6a47d719
...
...
@@ -6,6 +6,6 @@
<title>
BookRate
</title>
</head>
<body>
<h1>
Book Rating Application
</h1>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment