Supabase provide a hosted Postgres database with 500MB of storage in the free tier.
You can query and create data inside your vals using either Supabase’s JavaScript SDK, or a Postgres client.
Visit https://supabase.com/dashboard/sign-up.
On Supabase’s dashboard, create a new project.
Go to your project’s Settings via the sidebar. Inside API, scroll down and copy the Project URL, and then, inside Project API Keys, copy the ****service role
key. Save these as two separate Val Town secrets as supabaseURL
and supabaseKey
respectively.
Head to the Table editor in the sidebar.
Create a new table called my_first_table
with the following schema.
Copy and paste the following val to insert some data.
https://www.val.town/embed/vtdocs.supabaseSDKInsertIntoMyFirstTable