Run commands above to setup project
npm init -yto init NodeJs projectnpm install typescript tsx @types/node vitest -Dto install typescript and Vitest as testing librarynpx tsc --initto create typescript configuration file
Edit below items in tsconfig.json
"target": "ES2020""rootDir": "./src""outDir": "./dist""paths": { "@/*": ["./src/*"] }
Create the following scripts on package.json
"scripts": {
"dev": "tsx watch src/index.ts",
"start": "node build/index.js",
"build": "tsc",
"test": "vitest"
},Now create src/index.ts file and start coding :)