Getting Started

Use Supabase with Hono

Learn how to create a Supabase project, add some sample data to your database, secure it with auth, and query the data from a Hono app.


1

Create a Hono app

Boostrap the Hono example app from the Supabase Samples using the CLI.

Terminal

_10
npx supabase@latest bootstrap hono

2

Install the Supabase client library

The package.json file in the project includes the necessary dependencies, including @supabase/supabase-js and @supabase/ssr to help with server-side auth.

Terminal

_10
npm install

3

Set up the required environment variables

Copy the .env.example file to .env and update the values with your Supabase project URL and anon key.

Lastly, enable anonymous sign-ins in the Auth settings.

Project URL
Anon key
Terminal

_10
cp .env.example .env

4

Start the app

Start the app, go to http://localhost:5173.

Learn how server side auth works with Hono.

Terminal

_10
npm run dev

Next steps