Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@morjuax
Last active February 4, 2020 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morjuax/9b08ca45f8c871214fa8e066acc47ab7 to your computer and use it in GitHub Desktop.
Save morjuax/9b08ca45f8c871214fa8e066acc47ab7 to your computer and use it in GitHub Desktop.
Create Project Node + Typescript

Init

  1. mkdir typescript-starter
  2. cd typescript-starter
  3. npm init -y
  4. npm install typescript --save-dev
  5. npm install @types/node --save-dev
  6. npx tsc --init
  7. mkdir src
  8. touch src/index.ts
  9. into index => write => console.log("Hellow World")
  10. npx tsc
  11. Ready

Useful configurations & scripts

  1. npm install --save-dev ts-node nodemon
  2. touch nodemon.json
  3. add. { "watch": ["src"], "ext": ".ts,.js", "ignore": [], "exec": "ts-node ./src/index.ts" }

#Page https://khalilstemmler.com/blogs/typescript/node-starter-project/ https://github.com/morjuax/nodeTypeScriptScaffolding/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment