Hi I am new in Faunadb and trying a multi-tenancy app. There is option of creating child databases from fauna shell. But my thinking is when a user is signed up, a child database with that username will create automatically.
I searched in there documentation but got no idea. Is it possible from frontend JS libraries such as React, Vue or from API in Nodejs?
Thanks is advance.
Yes, you can programatically create a child database using
CreateDatabase
. Two things are important to note here:admin
role, so you'd want to do it from a secure backend node server.This is how the code might look: