Skip to content

Instantly share code, notes, and snippets.

@pongsatt
Created April 28, 2018 04:33
Show Gist options
  • Save pongsatt/facb0d7106395d624e13074608f8d8e6 to your computer and use it in GitHub Desktop.
Save pongsatt/facb0d7106395d624e13074608f8d8e6 to your computer and use it in GitHub Desktop.
How to setup NodeJs in typescript from scratch
yarn add -D typescript @types/node ts-node nodemon
mkdir <project name>
cd <project name>
yarn init -y
npx tsc --init
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"declaration": true,
"sourceMap": true,
"outDir": "dist",
"rootDir": "src",
"strict": true,
"esModuleInterop": true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment