A step by step Javascript data importer for Fauna DB, use this service inside or outside your application to import data.
npm install --save faunadb
-
Set up your database, collection and keys FaunaDB
-
Convert your data into an array Mr. Data Converter
-
Input data in the appropriate spots (commented and split up array if too large)
-
Utilize the buttons in the return to execute the import functions after following the steps and reading the comments
<button onClick={createDocumentImport}> Import everything in dataInputArray </button>
- This importer should only be used in development envs as the fauna secret is not hidden as it should in production
const client = new faunadb.Client({ secret: "Your Secret Here" });
- Split up your arrays if over 1000 entries