aalises / age-of-empires-II-api

API for Age of Empires II Built with Flask-RESTFul + SQLAlchemy
https://age-of-empires-2-api.herokuapp.com
BSD 3-Clause "New" or "Revised" License
120 stars 31 forks source link

Free hosting idea #20

Closed jpillora closed 3 years ago

jpillora commented 3 years ago

From the API spec, it appears it only supports GET all records, or one record by type. Therefore, this dataset could be traversed and all possible queries could be written as JSON files. Then, using Github pages or Cloudflare pages, you could serve all these JSON files for free on a GH/CF domain, or on a custom domain you provide.

Also, if the clients of this data are only web browsers, then you could use this strategy https://phiresky.github.io/blog/2021/hosting-sqlite-databases-on-github-pages/ to async query a static hosted (free) SQLite DB

aalises commented 3 years ago

Yes, there's no need for the SQLite database really, as we are effectively serving static data... if you are feeling like it @jpillora you could make an MR that deploys to github pages using some action e.g. this one and gets rid of the database (or also deploys it on GH pages as well using the webassembly shenanigans described on the article).

jpillora commented 3 years ago

No time unfortunately, just thought I'd throw the idea out there :+1: