October 23, 2023
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import process from "node:process";
export const supabaseSDKInsertIntoMyFirstTable = (async () => {
const { createClient } = await import(
"https://esm.sh/@supabase/supabase-js@2"
);
const supabase = createClient(
process.env.supabaseURL,
process.env.supabaseKey,
);
const { data, error } = await supabase
.from("my_first_table")
.insert({ name: "Alice", data: { job: "software engineer" } });
if (error) {
throw error;
}
})();
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023