mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 04:15:04 +03:00
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated all quickstart guides and tutorials to reference publishable keys instead of anon keys for Supabase client initialization. * Simplified environment variable setup instructions across multiple framework guides by removing anon key configuration requirements. * Clarified usage of publishable keys in step-by-step setup documentation for various frameworks and platforms. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: fadymak <dev@fadymak.com>
96 lines
2.6 KiB
Plaintext
96 lines
2.6 KiB
Plaintext
---
|
|
title: 'Use Supabase with Hono'
|
|
subtitle: '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.'
|
|
breadcrumb: 'Framework Quickstarts'
|
|
hideToc: true
|
|
---
|
|
|
|
<StepHikeCompact>
|
|
|
|
<StepHikeCompact.Step step={1}>
|
|
|
|
<StepHikeCompact.Details title="Create a Hono app">
|
|
|
|
Bootstrap the Hono example app from the Supabase Samples using the CLI.
|
|
|
|
</StepHikeCompact.Details>
|
|
|
|
<StepHikeCompact.Code>
|
|
|
|
```bash name=Terminal
|
|
npx supabase@latest bootstrap hono
|
|
```
|
|
|
|
</StepHikeCompact.Code>
|
|
|
|
</StepHikeCompact.Step>
|
|
|
|
<StepHikeCompact.Step step={2}>
|
|
<StepHikeCompact.Details title="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.
|
|
|
|
</StepHikeCompact.Details>
|
|
|
|
<StepHikeCompact.Code>
|
|
|
|
```bash name=Terminal
|
|
npm install
|
|
```
|
|
|
|
</StepHikeCompact.Code>
|
|
|
|
</StepHikeCompact.Step>
|
|
|
|
<StepHikeCompact.Step step={3}>
|
|
<StepHikeCompact.Details title="Set up the required environment variables">
|
|
|
|
Copy the `.env.example` file to `.env` and update the values with your Supabase project URL and publishable key.
|
|
|
|
Lastly, [enable anonymous sign-ins](/dashboard/project/_/auth/providers) in the Auth settings.
|
|
|
|
<ProjectConfigVariables variable="url" />
|
|
<ProjectConfigVariables variable="publishable" />
|
|
|
|
|
|
</StepHikeCompact.Details>
|
|
<StepHikeCompact.Code>
|
|
|
|
|
|
```bash name=Terminal
|
|
cp .env.example .env
|
|
```
|
|
|
|
{/* TODO: Not ideal for frameworks that have no entry in Connect */}
|
|
<$Partial path="api_settings_steps.mdx" variables={{ "framework": "", "tab": "frameworks" }} />
|
|
|
|
</StepHikeCompact.Code>
|
|
|
|
</StepHikeCompact.Step>
|
|
|
|
<StepHikeCompact.Step step={4}>
|
|
<StepHikeCompact.Details title="Start the app">
|
|
|
|
Start the app, go to http://localhost:5173.
|
|
|
|
Learn how [server side auth](/docs/guides/auth/server-side/creating-a-client?queryGroups=framework&framework=hono) works with Hono.
|
|
|
|
</StepHikeCompact.Details>
|
|
|
|
<StepHikeCompact.Code>
|
|
|
|
```bash name=Terminal
|
|
npm run dev
|
|
```
|
|
|
|
</StepHikeCompact.Code>
|
|
|
|
</StepHikeCompact.Step>
|
|
</StepHikeCompact>
|
|
|
|
## Next steps
|
|
|
|
- Learn how [server side auth](/docs/guides/auth/server-side/creating-a-client?queryGroups=framework&framework=hono) works with Hono.
|
|
- [Insert more data](/docs/guides/database/import-data) into your database
|
|
- Upload and serve static files using [Storage](/docs/guides/storage)
|