-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
setup project
- create package.json
npm init -y
- typescript init
tsc --init
- add ts-node to auto compile for typescript files
npm i --save-dev ts-node
auto reload
1. use ts-node-dev
npm i --save-dev typescript ts-node ts-node-dev
"scripts": {
"start": "ts-node-dev --respawn src/index.ts",
},
2. use nodemon(in case 1st approach do not work in window or etc.)
npm i --save-dev nodemon
"scripts": {
"dev": "nodemon --exec ts-node src/index.ts",
},
express
npm i express
npm i --save-dev @types/express @types/node
type vs. interface
- interface for object
- type for not object
@types
- for library not having type!
@types/sample.d.ts
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation