-
Notifications
You must be signed in to change notification settings - Fork 2
Create Database
Follow the next steps to create a Firebase realtime database:
Go to the Firebase website and click on Get started
Enter a name for your project
Disable Google Analytics then click on Create project
Click on Build
then select Realtime Database
Click on Create database
Select your time zone (url depends on it)
Select your default security rules
The console is an overview of your data, these are stored in the form of a JSON tree
In red, you have the URL of your database (need for authentication) and in blue: you have the content of your database.
Firebase Security Rules provide robust, completely customizable protection for your data in Realtime Database.
For example, this rule allows anyone to read a data set, but restricts the ability to create or modify data at a given path to the authenticated content owner only:
{
// Allow anyone to read data, but only authenticated content owners can
// make changes to their data
"rules": {
"some_path": {
"$uid": {
".read": true,
// or ".read": "auth.uid !== null" for only authenticated users
".write": "auth.uid === $uid"
}
}
}
}
Read more about Security Rules.