forked from mirrors/amnezia-wg-easy
		
	Improved local development and Dockerfile (#1015)
Thanks @davide-acanfora
This commit is contained in:
		
						commit
						7d05a82dae
					
				
					 6 changed files with 141 additions and 8 deletions
				
			
		
							
								
								
									
										1
									
								
								.dockerignore
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.dockerignore
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					/src/node_modules
 | 
				
			||||||
| 
						 | 
					@ -3,13 +3,9 @@
 | 
				
			||||||
FROM docker.io/library/node:18-alpine AS build_node_modules
 | 
					FROM docker.io/library/node:18-alpine AS build_node_modules
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Copy Web UI
 | 
					# Copy Web UI
 | 
				
			||||||
COPY src/ /app/
 | 
					COPY src /app
 | 
				
			||||||
WORKDIR /app
 | 
					WORKDIR /app
 | 
				
			||||||
RUN npm ci --omit=dev &&\
 | 
					RUN npm ci --omit=dev &&\
 | 
				
			||||||
    # Enable this to run `npm run serve`
 | 
					 | 
				
			||||||
    npm i -g nodemon &&\
 | 
					 | 
				
			||||||
    # Delete unnecessary files 
 | 
					 | 
				
			||||||
    npm cache clean --force && rm -rf ~/.npm &&\
 | 
					 | 
				
			||||||
    mv node_modules /node_modules
 | 
					    mv node_modules /node_modules
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Copy build result to a new image.
 | 
					# Copy build result to a new image.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
  "version": "1.0.1",
 | 
					  "version": "1.0.1",
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
    "build": "DOCKER_BUILDKIT=1 docker build --tag wg-easy .",
 | 
					    "build": "DOCKER_BUILDKIT=1 docker build --tag wg-easy .",
 | 
				
			||||||
    "serve": "docker-compose -f docker-compose.yml -f docker-compose.dev.yml up",
 | 
					    "serve": "docker compose -f docker-compose.yml -f docker-compose.dev.yml up",
 | 
				
			||||||
    "start": "docker run --env WG_HOST=0.0.0.0 --name wg-easy --cap-add=NET_ADMIN --cap-add=SYS_MODULE --sysctl=\"net.ipv4.conf.all.src_valid_mark=1\" --mount type=bind,source=\"$(pwd)\"/config,target=/etc/wireguard -p 51820:51820/udp -p 51821:51821/tcp wg-easy"
 | 
					    "start": "docker run --env WG_HOST=0.0.0.0 --name wg-easy --cap-add=NET_ADMIN --cap-add=SYS_MODULE --sysctl=\"net.ipv4.conf.all.src_valid_mark=1\" --mount type=bind,source=\"$(pwd)\"/config,target=/etc/wireguard -p 51820:51820/udp -p 51821:51821/tcp wg-easy"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										135
									
								
								src/package-lock.json
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										135
									
								
								src/package-lock.json
									
										
									
										generated
									
									
									
								
							| 
						 | 
					@ -18,6 +18,7 @@
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "devDependencies": {
 | 
					      "devDependencies": {
 | 
				
			||||||
        "eslint-config-athom": "^3.1.3",
 | 
					        "eslint-config-athom": "^3.1.3",
 | 
				
			||||||
 | 
					        "nodemon": "^3.1.0",
 | 
				
			||||||
        "tailwindcss": "^3.4.3"
 | 
					        "tailwindcss": "^3.4.3"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "engines": {
 | 
					      "engines": {
 | 
				
			||||||
| 
						 | 
					@ -672,6 +673,12 @@
 | 
				
			||||||
        "url": "https://opencollective.com/typescript-eslint"
 | 
					        "url": "https://opencollective.com/typescript-eslint"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "node_modules/abbrev": {
 | 
				
			||||||
 | 
					      "version": "1.1.1",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
 | 
				
			||||||
 | 
					      "dev": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "node_modules/acorn": {
 | 
					    "node_modules/acorn": {
 | 
				
			||||||
      "version": "7.4.1",
 | 
					      "version": "7.4.1",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
 | 
				
			||||||
| 
						 | 
					@ -2585,6 +2592,12 @@
 | 
				
			||||||
        "node": ">= 4"
 | 
					        "node": ">= 4"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "node_modules/ignore-by-default": {
 | 
				
			||||||
 | 
					      "version": "1.0.1",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
 | 
				
			||||||
 | 
					      "dev": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "node_modules/import-fresh": {
 | 
					    "node_modules/import-fresh": {
 | 
				
			||||||
      "version": "3.3.0",
 | 
					      "version": "3.3.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
 | 
				
			||||||
| 
						 | 
					@ -3195,6 +3208,92 @@
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.4.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.4.tgz",
 | 
				
			||||||
      "integrity": "sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ=="
 | 
					      "integrity": "sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ=="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "node_modules/nodemon": {
 | 
				
			||||||
 | 
					      "version": "3.1.0",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.0.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-xqlktYlDMCepBJd43ZQhjWwMw2obW/JRvkrLxq5RCNcuDDX1DbcPT+qT1IlIIdf+DhnWs90JpTMe+Y5KxOchvA==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "chokidar": "^3.5.2",
 | 
				
			||||||
 | 
					        "debug": "^4",
 | 
				
			||||||
 | 
					        "ignore-by-default": "^1.0.1",
 | 
				
			||||||
 | 
					        "minimatch": "^3.1.2",
 | 
				
			||||||
 | 
					        "pstree.remy": "^1.1.8",
 | 
				
			||||||
 | 
					        "semver": "^7.5.3",
 | 
				
			||||||
 | 
					        "simple-update-notifier": "^2.0.0",
 | 
				
			||||||
 | 
					        "supports-color": "^5.5.0",
 | 
				
			||||||
 | 
					        "touch": "^3.1.0",
 | 
				
			||||||
 | 
					        "undefsafe": "^2.0.5"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "bin": {
 | 
				
			||||||
 | 
					        "nodemon": "bin/nodemon.js"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "engines": {
 | 
				
			||||||
 | 
					        "node": ">=10"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "funding": {
 | 
				
			||||||
 | 
					        "type": "opencollective",
 | 
				
			||||||
 | 
					        "url": "https://opencollective.com/nodemon"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "node_modules/nodemon/node_modules/brace-expansion": {
 | 
				
			||||||
 | 
					      "version": "1.1.11",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "balanced-match": "^1.0.0",
 | 
				
			||||||
 | 
					        "concat-map": "0.0.1"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "node_modules/nodemon/node_modules/has-flag": {
 | 
				
			||||||
 | 
					      "version": "3.0.0",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "engines": {
 | 
				
			||||||
 | 
					        "node": ">=4"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "node_modules/nodemon/node_modules/minimatch": {
 | 
				
			||||||
 | 
					      "version": "3.1.2",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "brace-expansion": "^1.1.7"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "engines": {
 | 
				
			||||||
 | 
					        "node": "*"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "node_modules/nodemon/node_modules/supports-color": {
 | 
				
			||||||
 | 
					      "version": "5.5.0",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "has-flag": "^3.0.0"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "engines": {
 | 
				
			||||||
 | 
					        "node": ">=4"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "node_modules/nopt": {
 | 
				
			||||||
 | 
					      "version": "1.0.10",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "abbrev": "1"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "bin": {
 | 
				
			||||||
 | 
					        "nopt": "bin/nopt.js"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "engines": {
 | 
				
			||||||
 | 
					        "node": "*"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "node_modules/normalize-path": {
 | 
					    "node_modules/normalize-path": {
 | 
				
			||||||
      "version": "3.0.0",
 | 
					      "version": "3.0.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
 | 
				
			||||||
| 
						 | 
					@ -3710,6 +3809,12 @@
 | 
				
			||||||
        "node": ">=0.4.0"
 | 
					        "node": ">=0.4.0"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "node_modules/pstree.remy": {
 | 
				
			||||||
 | 
					      "version": "1.1.8",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
 | 
				
			||||||
 | 
					      "dev": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "node_modules/punycode": {
 | 
					    "node_modules/punycode": {
 | 
				
			||||||
      "version": "2.3.1",
 | 
					      "version": "2.3.1",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
 | 
				
			||||||
| 
						 | 
					@ -4083,6 +4188,18 @@
 | 
				
			||||||
        "url": "https://github.com/sponsors/isaacs"
 | 
					        "url": "https://github.com/sponsors/isaacs"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "node_modules/simple-update-notifier": {
 | 
				
			||||||
 | 
					      "version": "2.0.0",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "semver": "^7.5.3"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "engines": {
 | 
				
			||||||
 | 
					        "node": ">=10"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "node_modules/slash": {
 | 
					    "node_modules/slash": {
 | 
				
			||||||
      "version": "3.0.0",
 | 
					      "version": "3.0.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
 | 
				
			||||||
| 
						 | 
					@ -4436,6 +4553,18 @@
 | 
				
			||||||
        "node": ">=8.0"
 | 
					        "node": ">=8.0"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "node_modules/touch": {
 | 
				
			||||||
 | 
					      "version": "3.1.0",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
 | 
				
			||||||
 | 
					      "dev": true,
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "nopt": "~1.0.10"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "bin": {
 | 
				
			||||||
 | 
					        "nodetouch": "bin/nodetouch.js"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "node_modules/ts-api-utils": {
 | 
					    "node_modules/ts-api-utils": {
 | 
				
			||||||
      "version": "1.3.0",
 | 
					      "version": "1.3.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz",
 | 
				
			||||||
| 
						 | 
					@ -4614,6 +4743,12 @@
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/uncrypto/-/uncrypto-0.1.3.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/uncrypto/-/uncrypto-0.1.3.tgz",
 | 
				
			||||||
      "integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q=="
 | 
					      "integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q=="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "node_modules/undefsafe": {
 | 
				
			||||||
 | 
					      "version": "2.0.5",
 | 
				
			||||||
 | 
					      "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
 | 
				
			||||||
 | 
					      "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
 | 
				
			||||||
 | 
					      "dev": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "node_modules/unenv": {
 | 
					    "node_modules/unenv": {
 | 
				
			||||||
      "version": "1.9.0",
 | 
					      "version": "1.9.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/unenv/-/unenv-1.9.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/unenv/-/unenv-1.9.0.tgz",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,7 +5,7 @@
 | 
				
			||||||
  "description": "The easiest way to run WireGuard VPN + Web-based Admin UI.",
 | 
					  "description": "The easiest way to run WireGuard VPN + Web-based Admin UI.",
 | 
				
			||||||
  "main": "server.js",
 | 
					  "main": "server.js",
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
    "serve": "DEBUG=Server,WireGuard nodemon server.js",
 | 
					    "serve": "DEBUG=Server,WireGuard npx nodemon server.js",
 | 
				
			||||||
    "serve-with-password": "PASSWORD=wg npm run serve",
 | 
					    "serve-with-password": "PASSWORD=wg npm run serve",
 | 
				
			||||||
    "lint": "eslint .",
 | 
					    "lint": "eslint .",
 | 
				
			||||||
    "buildcss": "npx tailwindcss -i ./www/src/css/app.css -o ./www/css/app.css"
 | 
					    "buildcss": "npx tailwindcss -i ./www/src/css/app.css -o ./www/css/app.css"
 | 
				
			||||||
| 
						 | 
					@ -22,6 +22,7 @@
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "eslint-config-athom": "^3.1.3",
 | 
					    "eslint-config-athom": "^3.1.3",
 | 
				
			||||||
 | 
					    "nodemon": "^3.1.0",
 | 
				
			||||||
    "tailwindcss": "^3.4.3"
 | 
					    "tailwindcss": "^3.4.3"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "nodemonConfig": {
 | 
					  "nodemonConfig": {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,7 +22,7 @@ process.on('SIGTERM', async () => {
 | 
				
			||||||
  process.exit(0);
 | 
					  process.exit(0);
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Handle interupt signal
 | 
					// Handle interrupt signal
 | 
				
			||||||
process.on('SIGINT', () => {
 | 
					process.on('SIGINT', () => {
 | 
				
			||||||
  // eslint-disable-next-line no-console
 | 
					  // eslint-disable-next-line no-console
 | 
				
			||||||
  console.log('SIGINT signal received.');
 | 
					  console.log('SIGINT signal received.');
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue