nuxt-supabase icon indicating copy to clipboard operation
nuxt-supabase copied to clipboard

How to access supabase in server-middleware api?

Open skwasan opened this issue 2 years ago • 0 comments

How to access the nuxt supabase module in server-middleware/rest.js?

//rest.js

app.all('/getJSON', async (req, res) => { console.log('req', req.apikey) console.log(supabase) const { data, error } = await supabase .from('userdetails') .select('config') .eq('apikey', req.apikey) res.json({ data: data }) })

skwasan avatar Feb 15 '22 06:02 skwasan