Help to create Dockerfile for a typescript project

Hello,

Today I need to create a Dockerfile to execute a TS project (only use front-end).

My Dockerfile actually look like

FROM node:14-alpine

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . .

EXPOSE 3000

CMD [“npx”, “tsc”, “–watch”]

Image is working but when I go to port 3000 (where i redirect) i got nothing.

The goal is just to execute the TS file in Docker with the compilator on watch mode.

If someone can help me thanks a lot !

EDIT : if I use CMD [“node”, “./dist/app.js”]

I find my code but throw me a error “document.querySelector… Is not defined” because node environnement do not knowthe DOM