Adam's notes

some notes that are useful to me, and might be useful to you.

View My GitHub Profile

18 September 2020

Typescript for Server Development

by

npm i typescript ts-node-dev

folder structure:

|- dist/
	|- index.js
|- package.json
|- src/
	|- index.ts
|- tsconfig.json	

package.json (snip):

  "scripts": {
    "build": "tsc",
    "start": "tsc && node ./dist/index.js",
    "dev": "ts-node-dev --respawn --transpileOnly ./src/index.ts"
  }

tsconfig.json:

{
    "compilerOptions": {
        "rootDir": "./src/",
        "outDir": "./dist/",
        "sourceMap": true,
        "noImplicitAny": true,
        "module": "es6",
        "target": "es5",
        "jsx": "react",
        "allowJs": true
    }
}
tags: