🎛ī¸Self Hosted Config

When self hosted version of the app is used, the app needs to use these settings during embedding.

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: SELFHOSTED_URL,
};

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