Skip to content

Latest commit

 

History

History
70 lines (52 loc) · 2.68 KB

README-en.md

File metadata and controls

70 lines (52 loc) · 2.68 KB

BitArctic:re

stars   REPO SIZE   Last Commit   LICENSE  

Hosting:

  1. Fork the repository.
  2. Create a Supabase account.
  3. Copy the Project URL and anon public keys.
  4. You can create a .env file and set the variables like this:
PUBLIC_SUPABASE_URL=
PUBLIC_SUPABASE_ANON_KEY=
  1. In the SQL Editor on Supabase, paste the following:
-- First, drop existing policies
drop policy if exists "Enable insert for anonymous users" on pastes;
drop policy if exists "Enable select for anonymous users" on pastes;
drop policy if exists "Anyone can create pastes" on pastes;
drop policy if exists "Anyone can read pastes" on pastes;

-- Disable RLS temporarily to ensure a clean slate
alter table pastes disable row level security;

-- Enable RLS again
alter table pastes enable row level security;

-- Create policies with explicit permissions
create policy "Public insert access"
on pastes for insert
with check (true);

create policy "Public select access"
on pastes for select
using (true);

-- Grant necessary permissions to the anon role
grant usage on schema public to anon;
grant all on pastes to anon;
grant usage on all sequences in schema public to anon;

Note

The drop policy section is not mandatory; it is only required if the user made a mistake.

  1. Create a Vercel account (using your Github or Gitlab account).
  2. Select your repository and click Import.
  3. Add Environment Variables and set the variables (or import them from the .env file).
  4. Click Publish.