FROM node:20-alpine

WORKDIR /app

COPY package*.json ./

RUN npm install
# Also install nodemon globally for dev hot-reloading
RUN npm install -g nodemon

COPY . .

EXPOSE 4001
EXPOSE 9229

CMD ["nodemon", "--inspect=0.0.0.0:9229", "server.js"]
