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
Bootstrap the Hono example app from the Supabase Samples using the CLI.
Terminal
1npx supabase@latest bootstrap hono2
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
1npm install3
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
Publishable key
Terminal
1cp .env.example .env4
Terminal
1npm run devNext steps
- Learn how server side auth works with Hono.
- Insert more data into your database
- Upload and serve static files using Storage