An easy way to share private IP and port with other devices in the network. Quite handy when developing front end applications.
- Download the script into your home directory
$ curl -o ${HOME}/hostshare.sh https://raw.githubusercontent.com/pierreportal/hostshare/master/hostshare.sh
- Make script executable
$ chmod +x ${HOME}/hostshare.sh
- Source the script inside
.zshrc
$ echo "source ${HOME}/hostshare.sh" >> ${HOME}/.zshrc
- Source
.zshrc
$ source ${HOME}/.zshrc
$ hostshare -p <PORT> [-s]
(optional -s option for using https)