Skip to content

YatesyTea/stooti-poems-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stooti Poems V2

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:

  1. Small bundle size and page load to enable my partner to load it on poor internet connections.
  2. Don't expose full data-set to limit ddos surface attack area.
  3. Have some fun with Bun and Hono.

The architecture of this app is simple.

  1. Read Only SQLite Server in the bun runtime so that a separate server is not needed.
  2. Main page makes a request based on a hash which is generated by the current date.
  3. 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.