start restart script, missing feature

Signed-off-by: Nakul Manchanda <nakul.manchanda@ibm.com>
This commit is contained in:
Nakul Manchanda
2019-04-01 19:48:10 -04:00
parent dd1fcc4e37
commit f963f53b50
4 changed files with 25 additions and 1 deletions

View File

@@ -125,6 +125,14 @@ from TN3270 terminal
/s ZOWESVR
```
Or, we can use zowe helper scripts to restart zowe
```
ssh ibmuser@my.mainframe.com
cd /u/zowe/ibmuser/1.0.0/scripts
./zowe-stop.sh
./zowe-start.sh
```
### 2) Access newly deployed webservice behind api/v1
`https://my.mainframe.com:7554/api/v1/sample-node-api/accounts/`
`https://my.mainframe.com:7554/api/v1/sample-node-api/accounts/1/`

View File

@@ -0,0 +1,7 @@
#!/bin/sh
echo 'restarting sample node api...'
ps -elf | awk '/node/ && /app.js/ && !/sh -c/' | awk '{print $3}' | xargs kill -9 $1
./start-sample-node-api.sh
sleep 30
echo 'restart done'

View File

@@ -1,8 +1,11 @@
#!/bin/sh
# find node bin
# export NODE_HOME=/usr/lpp/IBM/cnj/IBM/node-v6.14.4-os390-s390x
# export NODE_HOME=/usr/lpp/IBM/cnj/IBM/node-v6.14.4-os390-s390x
if [ ! -z "$NODE_HOME" ]; then
NODE_BIN=${NODE_HOME}/bin/node
NPM_CLI=${NODE_HOME}/lib/node_modules/npm/bin/npm-cli.js
else
echo "Error: cannot find node bin, node app did not start"
exit 1
@@ -15,4 +18,4 @@ SCRIPT_DIR=$(dirname "$0")
cd "$SCRIPT_DIR/.."
# start service
$NODE_BIN server/app.js &
$NODE_BIN $NPM_CLI run start > sample-node-api.log &

View File

@@ -3,10 +3,16 @@ const router = express.Router({ mergeParams: true });
const accountsCarsController = require('../controllers/accountsCars.controller');
/*
// Add missing feature
// un-comment this to implement two new routes
// accounts/:id/cars & accounts/:id/cars/:id2
router.route('/cars')
.get(accountsCarsController.getAll);
router.route('/cars/:_id')
.get(accountsCarsController.get);
*/
module.exports = router;