The first generation of this webapp was put together in a very short amount of time, therefore it had some inefficiencies and was unable to be loaded on poor internet connections.
The goals of this version were:
- Small bundle size and page load to enable my partner to load it on poor internet connections.
- Don't expose full data-set to limit ddos surface attack area.
- Have some fun with Bun and Hono.
The architecture of this app is simple.
- Read Only SQLite Server in the bun runtime so that a separate server is not needed.
- Main page makes a request based on a hash which is generated by the current date.
- This displays a 'Poem of the Day'.
I've chosen to deploy on Fly.io as they have the smoothest process for deploying bun apps (vercel didn't support the runtime, only the install at time of making this app).
All that's required to run this application is:
bun install
then
bun run dev
or
bun build
bun run start
Changes can be made to the html and request which are all in 1 file index.tsx.