FaunaDB Add-on for Netlify
The FaunaDB Add-on for Netlify makes it easy to use FaunaDB Cloud as the database for your Netlify sites and functions.
FaunaDB is a serverless cloud database that offers fast global access to data via modern APIs, like GraphQL, without sacrificing data consistency. Ubiquitous, flexible, and secure, FaunaDB helps modern developers build applications fearlessly. It is an ideal companion for your serverless web applications hosted by Netlify, an excellent choice for web site hosting and development.
FaunaDB’s pricing model provides a generous free tier, which makes it ideal for developing your web application; you only pay when you exceed the thresholds for free service. See the pricing page for details.
FaunaDB’s multi-tenancy features make it easy to create and manage per-client databases, which simplifies your application development considerably. Just create a database for a specific client, and create and store a key for that database; when the client logs in, use the stored key to access the client’s database. You don’t need to worry about connection pooling, or data segregation; FaunaDB is accessed via HTTPS and there is no cross-database data contamination.
How to use the FaunaDB Add-on for Netlify
It only takes a few minutes to get setup.
-
Sign up for a Netlify account
You can skip this step if you already have a Netlify account.
-
Install the Netlify command-line tool
You can skip this step if you have previously installed
netlify-cli
.In a terminal, run the following command:
npm i netlify-cli -g
-
Create a folder for your Netlify project
If you already have a Netlify project created,
cd
into that folder in your terminal, then skip to the next step.In your terminal, run the following commands:
mkdir my_project cd my_project
-
Initialize your Netlify project
If you have already initialized your Netlify project, skip to the next step.
In your terminal, run the following command:
netlify init
-
Add the FaunaDB Add-on for Netlify
In your terminal, run the following command:
netlify addons:create fauna
-
Authenticate the Add-on
In your terminal, run the following command:
netlify addons:auth fauna
This step prompts you to sign up with FaunaDB, or login if you already have an account. Once logged in, you are prompted to name your database and import it into your account. This allows you to interact with your database directly using the FaunaDB Cloud Console.
That’s it!
You’re all done setting up the FaunaDB Add-on for Netlify.
The next step is to build your web application or microservice. See the Netlify documentation for help there. Check out the rest of the FaunaDB documentation for help writing queries and managing your data.
Was this article helpful?
We're sorry to hear that.
Tell us how we can improve!
documentation@fauna.com
Thank you for your feedback!