Created
April 28, 2021 12:48
-
-
Save surajsau/f5179918aeb73e454a1bd122890ef237 to your computer and use it in GitHub Desktop.
Tiny script to launch httpd to test links with custom URL scheme (ref: https://gist.github.com/thedoritos/91b086e46ea6da7c943b8fe4e910a22c)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# public/index.html | |
# | |
# <!DOCTYPE html> | |
# <html> | |
# <head> | |
# <title>URL Schemes</title> | |
# <meta charset="UTF-8"> | |
# <meta name="viewport" content="width=device-width, initial-scale=1"> | |
# </head> | |
# <body> | |
# <h3>customscheme://</h3> | |
# <p><a href="customscheme://login">Login</a></p> | |
# <p><a href="customscheme://screen1">Screen 1</a></p> | |
# <p><a href="customscheme://screen2?param1=value1">Screen 2</a></p> | |
# </body> | |
#</html> | |
STATIC_PAGE_URL=$1 | |
mkdir -p public | |
if [[ ! -f public/index.html ]]; then curl $STATIC_PAGE_URL > public/index.html; fi | |
ruby -run -e httpd ./public -p 8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment