npm install -g typescript
npm install -g nodemon
Create new folder
tsc --init
Add to tsconfig.json
"outDir": "./dist",
"rootDir": "./app",
Run the code editor build task (cmd + shift + b on mac vscode)
nodemon dist/main.js
node folder/dist/main.js
Code examples comes from https://codewithmosh.com/