Skip to content

zerodays/hono-template

Repository files navigation

Hono template

This is a template for a backend project using Deno with the Hono framework and Supabase as the database and for auth.

Getting Started

You need to have Deno, Infisical and Supabase cli installed on your machine.

grep the project for TODO comments and resolve them.

There is no need to install dependencies in Deno, just start the dev server with

deno task dev

or run the production server with

deno task start

Migrations

Caution

When you clear out all of your existing migration files in the supabase/migrations folder and run deno task db:generate (or otherwise regenerate your migrations folder), make sure to remove any SQL blocks that create the storage or auth schemas or tables from the new initial migration.

These objects are provisioned automatically by Supabase and do not need to be re-created in your own migrations, so omitting them will prevent “already exists” errors when you apply your fresh migration set.

We are using Drizzle. To change the database schema, modify the supabase/schema.ts file and then run

pnpm db:generate

to generate migrations. To apply the new migration, run

pnpm db:migrate

Supabase configuration

To compare your Supabase config with the dashboard, run

supabase link

choose your project, and optionally put in your DB password (I think you can still check the config even without this step).

To change your Supabase config, make changes to supabase/config.toml To commit them, run

supabase config push

About

Hono + Deno + Supabase backend project template

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published