Skip to content

michalvavra/fresh-sqlite-example

Repository files navigation

fresh-sqlite-example

Fresh example with SQLite and kysely query builder.

See running example on Fly.io.

Prerequisites

Optional

Development

Run

deno task start

# or

just run

This will watch the project directory and restart as necessary.

Initiate database

deno task migrate

Creates ./data/test.db with example data. It runs migrate_down and migrate_up tasks.

Create database and populate with data

deno task migrate_up

Clear database

deno task migrate_down

Deployment

Fly.io deployment configuration is based on Remix Indie Stack and Fly.io Run a Deno.

  • Create an app
flyctl launch
  • Create a persistent volume for the SQLite
flyctl volumes create data --size 1 --app fresh-sqlite-example
  • Deploy
flyctl deploy
  • Open in the web browser
flyctl open