
Public
reactHonoExample
Viewing readonly version: 162View latest version
This app uses Val Town SQLite to manage data. Every Val Town account comes with a free SQLite database, hosted on Turso. This folder is broken up into two files:
migrations.ts
- code to set up the database tables the app needsqueries.ts
- functions to run queries against those tables, which are imported and used in the main Hono server in/backend/index.ts
In backend/database/migrations.ts
, this app creates a new SQLite table reactHonoStarter_messages
to store messages.
This "migration" runs once on every app startup because it's imported in index.ts
. You can comment this line out for a slight (30ms) performance improvement on cold starts. It's left in so that users who fork this project will have the migration run correctly.