Skip to content

Instantly share code, notes, and snippets.

@WilfredAlmeida
Last active September 30, 2023 11:07
Show Gist options
  • Save WilfredAlmeida/28cf52dacb71cfcf46151eda978dd4e3 to your computer and use it in GitHub Desktop.
Save WilfredAlmeida/28cf52dacb71cfcf46151eda978dd4e3 to your computer and use it in GitHub Desktop.
TypeScript Express `tsconfig.json`

tsconfig.json

{
  "compilerOptions": {
    "target": "es6",
    "module": "commonjs",
    "strict": true,
    "esModuleInterop": true,
    "noImplicitAny": true,
    "moduleResolution": "node",
    "sourceMap": true,
    "outDir": "build",
    // "baseUrl": ".",
    "forceConsistentCasingInFileNames": true,
    "strictPropertyInitialization": false,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    // "paths": {
    //   "*": ["node_modules/*"]
    // }
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules"],
  "files": ["src/types/express/index.d.ts"],
}

package.json

{
  "name": "rooster-backend",
  "version": "1.0.0",
  "description": "Rooster Backend",
  "main": "index.js",
  "scripts": {
    "clean": "rimraf ./build",
    "build": "npm run clean && tsc && tsc ./src/types/express/index.d.ts",
    "start": "node build/index.js",
    "local": "ts-node --esm src/index.ts",
    "dev": "nodemon src -e ts,json --exec 'npm run local'"
  },
  "keywords": [
    "notification",
    "backend",
    "typescript",
    "nodejs",
    "solana"
  ],
  "author": "Wilfred Almeida",
  "license": "ISC",
  "devDependencies": {
    "@types/cors": "^2.8.13",
    "@types/dotenv": "^8.2.0",
    "@types/express": "^4.17.17",
    "@types/node": "^20.3.2",
    "nodemon": "^2.0.22",
    "npm-run-all": "^4.1.5",
    "rimraf": "^5.0.1",
    "ts-node": "^10.9.1",
    "typescript": "^5.1.5"
  },
  "dependencies": {
    "@supabase/supabase-js": "^2.33.2",
    "cors": "^2.8.5",
    "dotenv": "^16.3.1",
    "express": "^4.18.2",
    "express-validator": "^7.0.1",
    "firebase-admin": "^11.10.1",
    "jose": "^4.14.4",
    "ulid": "^2.3.0",
    "winston": "^3.9.0"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment