- typescript
- ts-node
- nodemon
- express @types/express
-
start a project
yarn init
-
install packages
yarn add typescript ts-node nodemon express @types/express
-
add to
package.json
scripts:"scripts": { ........, "tsc": "tsc", "start": "nodemon server.ts" }
It will allow
nodemon
to monitor and update when we change theserver.ts
file.It will also allow the use of
tsc
command to createtsconfig.json
file -
run
yarn tsc --init
This will create a new
tsconfig.json
file -
Create
server.ts
npm init
npm install typescript
"scripts": {
........,
"tsc": "tsc"
}
npx tsc --init
npm install express @types/express
npm run tsc
yarn add -D nodemon
yarn add -D typescript ts-node
TODO: GITIGNORE