Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- # ./node-debug.sh app.js
- #
- function usage() {
- echo "Usage $0 [-p port] [jsfile]"
- exit 1
- }
- while getopts p: OPT; do
- case $OPT in
- "p") PORT=$OPTARG
- ;;
- *) usage
- ;;
- esac
- done
- if [ -z $PORT ]; then
- PORT=8989
- fi
- shift `expr $OPTIND - 1`
- node-inspector --web-port=$PORT &
- if [ $? -eq 0 ]; then
- node --debug $1
- fi
Add Comment
Please, Sign In to add comment