🎛ī¸Custom Config

To provide custom configurations please follow this page.

To change the configs we need to add some changes -

Where we are importing the plugin in the same file -

import "@databrainhq/plugin/web";

window.dbn = {
  baseUrl: "https://example.com",
};

Assign configs in the window.dbn object. baseUrl - The base API endpoint e.g. https://api.example.com, https://yourdomain.com, etc.


You may face typescript errors while assigning to window.dbn this can be resolved by adding the below code to any global d.ts file

interface Window {
  dbn: Record<string, string>;
}

Last updated