A shell script may not be the best tool for this problem; but you can use a script like this to redirect the browser to a new location each time you redeploy the application and mark localhost:<port>:
#!/bin/bash
local_port="${1:?provide local port to listen on}"
redirect="${2:?provide application ip address}"
while :; do
(
echo "HTTP/1.1 200 OK"
echo ""
echo "<head>"
echo " <meta http-equiv=\"refresh\" content=\"0; url=$redirect\" />"
echo "</head>"
echo ""
) | ncat -l -p "$local_port" > /dev/null
done
localhost:8000 Firefox script . script ; . script, , .
$ bash redirect.sh 8000 192.168.1.10/app1
$ bash redirect.sh 8001 192.168.1.11/app1