tigawanna / node-express-typescript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HELLO

this is a nodejs-express-typescript projectwhich yu can use an a starting point by cloning or follow te steps i sued to set it up below

mmkdir mkdir node-express-typescript
cd node-express-typescript/
npm init --yes

then we install some packages

npm install express dotenv
npm i -D typescript @types/express @types/node
npm install -D concurrently nodemon

then run npx tsc --init
to configure typescript

don't forget to add the outdir option

  "compilerOptions": {
    "outDir": "./dist"

    // rest options remain same
  }
}

and the scripts

{
  "scripts": {
    "build": "npx tsc",
    "start": "node dist/index.js",
    "dev": "concurrently \"npx tsc --watch\" \"nodemon -q dist/index.js\""
  }
}

About


Languages

Language:TypeScript 100.0%