the usual stuff:
npm run devnpm run build
Step 1: init the TS project
npm i typescript --save-dev
npx tsc --init
mkdir srcStep 2: to tune up the compiler options
echo 'NODE_ENV=development' > .env.local
echo 'NODE_ENV=production' > .env.build
vi tsconfig.jsonStep 3: install dev dependencies
npm install \
@types/node \
typescript \
ts-node \
eslint \
typescript-eslint \
globals \
--save-devDocker
the dockerfile is a simple example of how to run a typescript project in a container build the image with:
docker build -t ts-boiler-room .
run the container with:
docker run -it --rm ts-boiler-room
The Dockerfile is semi-production ready, meaning... it's gcompile e copy only the build forlder. So it's NOT RECCOMENDED for dev/testing