Skip to content

Commit

Permalink
added correct server file
Browse files Browse the repository at this point in the history
  • Loading branch information
hackeramitkumar committed Jun 25, 2023
1 parent 46dfc74 commit 502a791
Show file tree
Hide file tree
Showing 436 changed files with 62,301 additions and 1 deletion.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use an official Node.js runtime as the base image
FROM node:14

# Set the working directory in the container
WORKDIR /app

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Install project dependencies
RUN npm install

# Copy the application code to the working directory
COPY . .

# Expose the port on which the server is listening
EXPOSE 3000

# Start the server
CMD [ "node", "app.js" ]
11 changes: 11 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const express = require('express');
const app = express();

app.get('/', (req, res) => {
res.send('Hello, World!');
});

const port = process.env.PORT || 3000;
app.listen(port, () => {
console.log(`Server running on port ${port}`);
});
1 change: 1 addition & 0 deletions node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 502a791

Please sign in to comment.