GitHub JSON Server
Introduction
Recently, I would like to serve some JSON files that are being updated routinely in GitHub repository so that they can be retrieved by HTTP requests.
However, after uploading the GitHub JSON files to the GitHub repository, I found that GitHub will attach a token string, such as token=GHSAT0AAAAAABH4P5FAZ5Z7T45EG64MBT2IYTMX4EQ
to the JSON URL. The token string will also be updated if the GitHub JSON file gets updated. Since the URL will “randomly” change, it is not friendly to HTTP requests.
In this blog post, I would like to show to how to serve JSON file using constant URL on GitHub.
GitHub Page Serving JSON
It turns out that if we turn on the GitHub Page for the repository, the JSON URL will be a constant.
To turn on GitHub Page for the repository, simply to go the repository settings.
References
GitHub JSON Server