npm i express cors dotenv
npm i -D typescript ts-node-dev
npm i -D @types/node @types/express @types/cors
npm i morgan
npm i -D @types/morgan
npx tsc --init
{
"rootDir": "./src",
"outDir": "./dist"
}
- Dockerfile
- .dockerignore
docker build -t demo-node-16-ts .
docker run -it -p 4000:3000 demo-node-16-ts
docker run -it -e PORT=5000 -p 5001:5000 demo-node-16-ts
docker-compose up --build
docker-compose down --rmi all