0
0
Supabasecloud~10 mins

Environment management in Supabase - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the environment variable for the Supabase URL.

Supabase
export SUPABASE_URL=[1]
Drag options to blanks, or click blank then click option'
Ahttps://api.supabase.io
Bhttps://your-project.supabase.co
Clocalhost:5432
Dhttp://127.0.0.1
Attempts:
3 left
💡 Hint
Common Mistakes
Using localhost or IP address instead of the Supabase project URL.
Omitting the https:// prefix.
2fill in blank
medium

Complete the code to set the environment variable for the Supabase API key.

Supabase
export SUPABASE_KEY=[1]
Drag options to blanks, or click blank then click option'
Ayour-secret-api-key
Bpublic-anonymous-key
C123456
Dapikey
Attempts:
3 left
💡 Hint
Common Mistakes
Using the public anonymous key instead of the secret key.
Using a placeholder or incomplete key.
3fill in blank
hard

Fix the error in the environment variable export command for Supabase URL.

Supabase
export SUPABASE_URL=[1]
Drag options to blanks, or click blank then click option'
A"https://your-project.supabase.co"
Byour-project.supabase.co
Chttps://your-project.supabase.co
Dhttps://your-project.supabase.co/
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes causing syntax errors.
Including trailing slashes that might cause issues.
4fill in blank
hard

Fill both blanks to initialize the Supabase client with environment variables.

Supabase
const supabase = createClient([1], [2]);
Drag options to blanks, or click blank then click option'
Aprocess.env.SUPABASE_URL
Bprocess.env.SUPABASE_KEY
CSUPABASE_URL
DSUPABASE_KEY
Attempts:
3 left
💡 Hint
Common Mistakes
Using raw strings instead of environment variables.
Mixing up URL and key positions.
5fill in blank
hard

Fill all three blanks to create a secure environment configuration file for Supabase.

Supabase
module.exports = {
  supabaseUrl: [1],
  supabaseKey: [2],
  options: { schema: [3] }
};
Drag options to blanks, or click blank then click option'
Aprocess.env.SUPABASE_URL
Bprocess.env.SUPABASE_KEY
C'public'
D'private'
Attempts:
3 left
💡 Hint
Common Mistakes
Hardcoding sensitive keys instead of using environment variables.
Using incorrect schema names.