create node project with typescript code example

Example 1: install typescript in node project

//Author:Mohammad Arman Khan
//Command to install typeScript in node(express)Project
npm i -D @types/node typescript ts-node

Example 2: create typescript project

npx tsc index.ts

Example 3: start node typescript project

// create the tsConfig.json file
npx tsc --init --rootDir src --outDir build \
--esModuleInterop --resolveJsonModule --lib es6 \
--module commonjs --allowJs true --noImplicitAny true