diff --git a/openLocal.sh b/openLocal.sh index de1498d..090cfa0 100755 --- a/openLocal.sh +++ b/openLocal.sh @@ -1,9 +1,14 @@ #!/bin/bash -#http://localhost:8000 +# Start a simple HTTP server using Python in the background +python3 -m http.server 8000 & -#!/bin/bash +# Give the server a second to start +sleep 2 + +# Open the default web browser and navigate to http://localhost:8000 +xdg-open http://localhost:8000 # For Linux -# Start a simple HTTP server using Python -python3 -m http.server 8000 +# For macOS, use the following line instead: +# open http://localhost:8000