Untitled

 avatar
unknown
plain_text
5 months ago
499 B
5
Indexable
# Use an official Node.js runtime as a parent image
FROM node:18

# Set the working directory inside the container
WORKDIR /app

# Copy package.json and package-lock.json to install dependencies first
COPY package*.json ./

# Install all dependencies (including dev dependencies)
RUN npm install

# Copy the rest of the application code
COPY . .

# Expose the port that your app runs on (change as needed)
EXPOSE 3000

# Start the app with nodemon for hot-reloading
CMD ["npx", "nodemon", "app.js"]
Editor is loading...
Leave a Comment