Skip to content
Documentation
YAML Adapter

YAML Adapter

The YAML Adapter in verse.db allows seamless interaction with your data stored in YAML files. Here's how you can set it up and use it:

Setting Up the Database:

  • First, establish a connection to your database using the versedb.connect function.

  • Specify the adapter as "yaml" and provide the path to the directory containing your YAML files using the dataPath parameter.

  • Optionally, enable development logs (devLogs) and encryption (not recommended for now) using the respective settings.

  • Example configuration:

    const versedb = require("verse.db");
    const db = versedb.connect({
      adapter: "yaml",
      dataPath: "./data", // Path to your YAML files
      devLogs: {
        enable: true,
        path: "./logs",
      },
      encryption: {
        enable: false,
        secret: "", // Your secret passphrase (optional)
      }
    });

Feel free to explore the power of the YAML Adapter in verse.db for efficient data management! 📂✨

Functions:


VERSE.DB. Powered by JEDI Studio.