https://kumar-salokya007.medium.com/how-to-secure-a-node-js-app-d2581a53dddc
Sunday, April 17, 2022
Wednesday, March 30, 2022
Sunday, February 27, 2022
Saturday, February 12, 2022
Saturday, February 5, 2022
Wednesday, January 12, 2022
TS-Node: Typescript execute engine
In my previous article, I have described how to create a simple typescript nodejs project. The method works fine in a small project, but take longer compilation time on a large project because its need to compile all typescript files on every change.
Create Node.js & Express.js with Typescript Project
The solution is using ts-node where it direct run the typescript without compiling it to javascript.
- Follow the steps to create a Node.js & Express.js with Typescript.
- Type "npm install -g ts-node".
- Add an entry to package.json."scripts": {"test": "echo \"Error: no test specified\" && exit 1","build": "tsc -b","start": "node dist/app.js","dev": "nodemon dist/app.js","dev:ts": "nodemon --exec ts-node src/app.ts"},
- Now you can just run the development using 1 console: npm run dev:ts
Subscribe to:
Posts (Atom)