# Use the official Node.js image as the base image FROM node:latest # Set the working directory inside the container WORKDIR /usr/src/app # Copy package.json and package-lock.json to the working directory COPY package*.json ./ # Install dependencies, including 'nodemon' for development RUN npm install # Copy the rest of your application code COPY . . # Expose the port your app runs on EXPOSE 3000 # Start the application using 'nodemon' for automatic reloading CMD ["npx", "nodemon", "server.js"]