Skip to content

Instantly share code, notes, and snippets.

@sravan464
Last active March 19, 2024 19:36
Show Gist options
  • Select an option

  • Save sravan464/609a8c58e746d5391922c11f6a0b3381 to your computer and use it in GitHub Desktop.

Select an option

Save sravan464/609a8c58e746d5391922c11f6a0b3381 to your computer and use it in GitHub Desktop.

Revisions

  1. sravan464 revised this gist Sep 17, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion nestjs-nodemon-setup.txt
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    note: if you use nestjs/cli@5.8.0 => then you will get nodemon setup by default
    note: if you use versions below nestjs/cli@5.8.0 => then you will get nodemon setup by default


    nodemon.json
  2. sravan464 revised this gist Sep 17, 2019. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions nestjs-nodemon-setup.txt
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    note: if you use nestjs/cli@5.8.0 => then you will get nodemon setup by default


    nodemon.json
    ----------

  3. sravan464 created this gist Sep 17, 2019.
    83 changes: 83 additions & 0 deletions nestjs-nodemon-setup.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,83 @@
    nodemon.json
    ----------

    {
    "watch": ["src"],
    "ext": "ts",
    "ignore": ["src/**/*.spec.ts"],
    "exec": "ts-node -r tsconfig-paths/register src/main.ts"
    }

    nodemon-debug.json
    ----------
    {
    "watch": ["src"],
    "ext": "ts",
    "ignore": ["src/**/*.spec.ts"],
    "exec": "node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts"
    }


    package.json
    -----------
    {
    "name": "demo-1",
    "version": "0.0.0",
    "description": "description",
    "author": "",
    "license": "MIT",
    "scripts": {
    "build": "tsc -p tsconfig.build.json",
    "format": "prettier --write \"src/**/*.ts\"",
    "start": "ts-node -r tsconfig-paths/register src/main.ts",
    "start:dev": "nodemon",
    "start:debug": "nodemon --config nodemon-debug.json",
    "prestart:prod": "rimraf dist && npm run build",
    "start:prod": "node dist/main.js",
    "lint": "tslint -p tsconfig.json -c tslint.json",
    "test": "jest",
    "test:watch": "jest --watch",
    "test:cov": "jest --coverage",
    "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
    "test:e2e": "jest --config ./test/jest-e2e.json"
    },
    "dependencies": {
    "@nestjs/common": "^5.4.0",
    "@nestjs/core": "^5.4.0",
    "reflect-metadata": "^0.1.12",
    "rimraf": "^2.6.2",
    "rxjs": "^6.2.2",
    "typescript": "^3.0.1"
    },
    "devDependencies": {
    "@nestjs/testing": "^5.1.0",
    "@types/express": "^4.16.0",
    "@types/jest": "^23.3.1",
    "@types/node": "^10.7.1",
    "@types/supertest": "^2.0.5",
    "jest": "^23.5.0",
    "nodemon": "^1.18.3",
    "prettier": "^1.14.2",
    "supertest": "^3.1.0",
    "ts-jest": "^23.1.3",
    "ts-loader": "^4.4.2",
    "ts-node": "^7.0.1",
    "tsconfig-paths": "^3.5.0",
    "tslint": "5.11.0"
    },
    "jest": {
    "moduleFileExtensions": [
    "js",
    "json",
    "ts"
    ],
    "rootDir": "src",
    "testRegex": ".spec.ts$",
    "transform": {
    "^.+\\.(t|j)s$": "ts-jest"
    },
    "coverageDirectory": "../coverage",
    "testEnvironment": "node"
    }
    }