From 4cfb4a7f4dfa7eff8c1aefe7a87c13ca8090a14c Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 7 Dec 2017 15:27:15 +0100 Subject: [PATCH] upd: packages.json (added commands: 'ws-start', 'ws-stop', 'ws-restart') | add: ndli1718.jar (added to .gitignore) --- .gitignore | 2 ++ package.json | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index dd9a003..c51b143 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +websocket.out +ndli1718.jar .vscode .DS_Store node_modules/ diff --git a/package.json b/package.json index dab4121..7ba1cf2 100755 --- a/package.json +++ b/package.json @@ -10,7 +10,11 @@ "build:bundle": "cross-env NODE_ENV=production webpack --progress --hide-modules", "build:dev": "cross-env NODE_ENV=development webpack --progress --hide-modules", "dev": "npm run build:clean; npm run build:dev", - "build": "npm run build:clean; npm run build:bundle" + "build": "npm run build:clean; npm run build:bundle", + + "ws-start": "java -jar ./ndli1718.jar > ./websocket.out 2>&1 &", + "ws-stop": "ps -aux | grep 'java -jar ./ndli1718.jar' | grep -v 'grep' && echo 'killing process..' && kill `ps -aux | grep \"java -jar ./ndli1718.jar\" | grep -v \"grep\" | awk '{print $2}'` && echo 'killed' || return 0", + "ws-restart": "npm run ws-stop; npm run ws-start" }, "dependencies": { "vue": "^2.5.9"