File tree Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,14 @@ services:
2525 # When build exists, to name the container use the image tag
2626 image : clean-node-api
2727 restart : always
28- command : npm run start
28+ command : npm run debug
2929 # WORKDIR path of project build
3030 volumes :
3131 - ./dist:/usr/src/clean-node-api/dist
32+ - ./package.json:/usr/src/clean-node-api/package.json
3233 ports :
3334 - " 3333:3333"
35+ - " 9222:9222"
3436 # Link access api with mongo
3537 links :
3638 - mongo
Original file line number Diff line number Diff line change 66 "scripts" : {
77 "start" : " node dist/main/server.js" ,
88 "build" : " rimraf dist && tsc" ,
9+ "debug" : " node --inspect=0.0.0.0:9222 --nolazy dist/main/server.js" ,
910 "up" : " npm run build && docker-compose up -d" ,
1011 "down" : " docker-compose down" ,
1112 "test" : " jest --passWithNoTests --silent --noStackTrace --runInBand" ,
Original file line number Diff line number Diff line change 11{
2- "compilerOptions" : {
3- "outDir" : " dist" , // Where the .js files to be interpreted by the node
4- "module" : " CommonJS" , // Type imports, no require
5- "target" : " ES2019" ,
6- "esModuleInterop" : true , // Converts modules that do not use commonjs
7- "skipLibCheck" : true ,
8- },
9- "include" : [" src" ],
10- "exclude" : [" **/*.spec.ts" , " **/*.test.ts" ],
2+ "compilerOptions" : {
3+ "outDir" : " dist" , // Where the .js files to be interpreted by the node
4+ "module" : " CommonJS" , // Type imports, no require
5+ "target" : " ES2019" ,
6+ "esModuleInterop" : true , // Converts modules that do not use commonjs
7+ "skipLibCheck" : true ,
8+ /*
9+ shows which ts file it generated the js,
10+ this helps to find the location of the file to debug
11+ */
12+ "sourceMap" : true ,
13+ },
14+ "include" : [" src" ],
15+ "exclude" : [" **/*.spec.ts" , " **/*.test.ts" ],
1116}
You can’t perform that action at this time.
0 commit comments