### Event Property: Installation ID Example Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Settings/event-reference.md Example of the 'installationId' property, a globally unique identifier for the installation. ```text 2d714b1745b1-40d7b36f539e214d8170 ``` -------------------------------- ### Install Dependencies Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Develop & Scale/microfrontend-example.md Run this command to install project dependencies before starting the development server. ```bash yarn install ``` -------------------------------- ### Installation First Startup Event Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Settings/event-reference.md Placeholder for the 'installation:firstStartup' event. Specific properties are not detailed in the source. ```text installation:firstStartup ``` -------------------------------- ### Local Dev Environment Output Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Develop & Scale/custom-plugin/quickstart-plugins.md Example output when starting the Budibase development environment. It shows the services starting, configuration being written, and the connection details for the local instance. ```text ? Directory to watch ./ Starting services, this may take a moment - first time this may take a few minutes to download images. Recreating plugins_budibase_1 ... Recreating plugins_budibase_1 ... done Services started, please go to http://localhost:10000 for next steps. Configuration has been written to docker-compose.yaml Development environment started successfully - connect at: http://localhost:10000 Use the following credentials to login: Email: admin@admin.com Password: admin ``` -------------------------------- ### Budibase CLI Environment File Example Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/server-migration.md Configure your Budibase CLI with CouchDB and MinIO/S3 credentials using an environment file. This file is essential for the CLI to access your installation's persistent data. ```text COUCH_DB_URL=http://:@localhost:10000/db/ MINIO_ACCESS_KEY= MINIO_SECRET_KEY= MINIO_URL=http://localhost:10000 MAIN_PORT=10000 ``` -------------------------------- ### Initialize Budibase Hosting Source: https://github.com/budibase/docs/blob/v4.0.0/docs/References/budibase-cli-reference.md Initializes a self-hosted Docker Compose Budibase setup in the current directory. This command pulls necessary images and prepares the environment to start the Budibase server. ```shell budi hosting --init ``` -------------------------------- ### Start Budibase Hosting Service Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Develop & Scale/custom-plugin/index.md Start the Budibase hosting service after configuring plugin directories or other settings. ```bash budi hosting --start ``` -------------------------------- ### Daily Usage of Budibase in WSL2 Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/windows-server.md Commands to start Budibase after initial setup when using WSL2, including activating the Linux shell and running Docker Compose. ```bash wsl cd ~/budibase docker compose up -d ``` -------------------------------- ### Event Property: Version Example Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Settings/event-reference.md Example of the 'version' property indicating the software version at the time of the event. ```text 1.0.201 ``` -------------------------------- ### Install Budibase Helm Chart Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/kubernetes-k8s.md Installs the Budibase Helm chart from the OCI registry. This command creates the namespace if it doesn't exist and installs Budibase with default configurations. ```shell helm install --create-namespace --namespace budibase budibase oci://ghcr.io/budibase/charts/budibase ``` -------------------------------- ### Install MySQL Node Connector Source: https://github.com/budibase/docs/blob/v4.0.0/docs/References/contributing-to-budibase/writing-your-own-external-data-connector.md Install the 'mysql' package in the server directory using yarn. ```shell cd packages/server yarn add mysql ``` -------------------------------- ### Start Development Server (No OIDC Bridge) Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Develop & Scale/microfrontend-example.md Execute this command to start the development server for the default mode where Budibase handles authentication. ```bash yarn dev ``` -------------------------------- ### Installation Version Checked Event Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Settings/event-reference.md Structure for the 'installation:version:checked' event, including the current version. ```json { "currentVersion": "string" } ``` -------------------------------- ### Install Budibase CLI on Debian/Ubuntu Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/budibase-cli-setup.md Installs Docker, Node.js, and the Budibase CLI globally using npm. Verifies the installation by checking the CLI version. ```bash sudo apt install docker.io curl -sL https://deb.nodesource.com/setup_18.x | sudo bash - npm install -g @budibase/cli budi --version ``` -------------------------------- ### Example Budibase Pods Running Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/kubernetes-k8s.md This output shows an example of successfully running Budibase pods in the Kubernetes cluster. All pods should be in a 'Running' state. ```shell NAME READY STATUS RESTARTS AGE app-service-69b7888b7-h25cp 1/1 Running 0 90m budibase-couchdb-0 1/1 Running 0 90m minio-service-59c757bb5-q6xt2 1/1 Running 0 90m proxy-service-6449dd9fdf-v5r6z 1/1 Running 0 90m redis-service-c6f59dcf5-lh7v5 1/1 Running 0 90m worker-service-55b49f4cdc-qr5b7 1/1 Running 0 90m ``` -------------------------------- ### Start Budibase Development Environment Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Develop & Scale/custom-plugin/quickstart-plugins.md Initiate a local Budibase development environment. This command starts the necessary services and prepares the instance for plugin development. ```bash budi plugins --dev ``` -------------------------------- ### Install Budibase CLI with NPM Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/budibase-cli-setup.md Installs the Budibase CLI globally using npm. Assumes Node.js version 20+ is already installed. ```bash npm install -g @budibase/cli ``` -------------------------------- ### Example Cloud URL Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Settings/tenant-management/finding-your-tenant-id.md This is an example of a Budibase Cloud URL. The tenant ID is the first part of this URL. ```text https://birdwatch.budibase.app ``` -------------------------------- ### Event Property: Environment Example Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Settings/event-reference.md Example of the 'environment' property specifying the Budibase instance environment. ```text docker-compose ``` -------------------------------- ### Start Development Server (OIDC Bridge Mode) Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Develop & Scale/microfrontend-example.md Run this command to start the development server when using OIDC bridge mode for authentication. ```bash yarn dev:oidc ``` -------------------------------- ### Install Budibase CLI using NPM Source: https://github.com/budibase/docs/blob/v4.0.0/recipes/budibase-cli-setup-npm.md Install the Budibase CLI globally using npm. This command is used to manage your Budibase installation. ```shell $ npm i -g @budibase/cli ``` -------------------------------- ### Budibase Plugin Initialization Response Example Source: https://github.com/budibase/docs/blob/v4.0.0/recipes/create-a-budibase-plugin.md This is an example of a successful JSON response after initializing a Budibase plugin. ```json {"success":true} ``` -------------------------------- ### Install WSL2 and Ubuntu Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/windows-server.md Installs the Windows Subsystem for Linux version 2 and the Ubuntu distribution using PowerShell. ```powershell wsl --install -d Ubuntu ``` -------------------------------- ### Installation Version Upgraded Event Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Settings/event-reference.md Structure for the 'installation:version:upgraded' event, detailing the version change from and to. ```json { "from": "string", "to": "string" } ``` -------------------------------- ### Event Property: Hosting Example Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Settings/event-reference.md Example of the 'hosting' property, indicating 'self' for self-hosted or 'cloud' for Budibase cloud. ```text self ``` -------------------------------- ### Event Property: Service Example Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Settings/event-reference.md Example of the 'service' property indicating the service that sent the event. ```text app-service ``` -------------------------------- ### Install Budibase CLI with Yarn Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/budibase-cli-setup.md Installs the Budibase CLI globally using Yarn. This is an alternative to using npm. ```bash yarn global add @budibase/cli ``` -------------------------------- ### Example of withFirst Helper Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Bindings/helpers/array-helpers.md This example demonstrates how to use the withFirst helper with a data provider's rows to access the first item. ```Text HandleBars {{#withFirst New Data Provider.Rows }} {{this}} {{/withFirst}} ``` -------------------------------- ### Export Budibase Installation with Interactive Prompts Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/server-migration.md Initiate a Budibase installation export when no environment file is present. The CLI will prompt you to enter the necessary access keys interactively. ```bash budi backups --export ``` -------------------------------- ### Example Iteration with forOwn Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Bindings/helpers/object-helpers.md Illustrates using the 'forIn' helper to access properties like name, age, and email from 'New Data Provider.Rows'. This example assumes a specific data structure. ```Text handleBars {{ #forIn New Data Provider.Rows }} {{ name }} {{ age }} {{ email }} {{/forIn}} ``` -------------------------------- ### Example SQL Query Log Format Source: https://github.com/budibase/docs/blob/v4.0.0/docs/References/troubleshooting-sql.md This is an example of how SQL queries will be logged when SQL query logging is enabled. It shows the database type, the query, and any associated values. ```text [SQL] [PG] query="select * from table limit $1" values="100" ``` -------------------------------- ### Start and Check Budibase Containers Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/windows-server.md Starts Budibase services in detached mode using Docker Compose and then lists the running containers to verify the deployment. ```bash docker compose up -d docker compose ps ``` -------------------------------- ### Example Iteration with forIn Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Bindings/helpers/object-helpers.md Demonstrates iterating over object properties using the 'forIn' helper, accessing name, age, and email. This example assumes a 'user' object structure. ```Text Object Breakdown Key: name, Value: John Key: age, Value: 30 Key: email, Value: john@example.com ``` -------------------------------- ### Example of Handlebars in Data Source Query Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Bindings/bindings.md When building a query, you can use Handlebars syntax to specify where parameters should be inserted. This example shows how to select all users where the username matches a provided value. ```Handlebars SELECT * FROM users WHERE username = {{ value }} ``` -------------------------------- ### Get AWS EKS Ingress Address Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/kubernetes-k8s.md Retrieve the address of the provisioned Ingress resource on AWS EKS. This address is used to access your Budibase installation in a browser. ```shell $ kubectl --context qa -n budibase get ingress NAME CLASS HOSTS ADDRESS PORTS AGE ingress-budibase * 4372843243278.eu-west-1.elb.amazonaws.com 80 9m5s ``` -------------------------------- ### Navigate and Build Datasource Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Develop & Scale/custom-plugin/custom-datasource.md After initializing your datasource plugin, navigate into the project directory and run the build command. Ensure you have updated the server environment variable for hot-reloading. ```shell cd my-datasource yarn build ``` -------------------------------- ### Initialize Budibase Hosting Source: https://github.com/budibase/docs/blob/v4.0.0/recipes/budibase-cli-setup-npm.md Initialize Budibase hosting in the current directory. This will create necessary files and prompt for configuration details. ```shell budi hosting --init ? This will create multiple files in the current directory, should continue? Yes ? Please enter the port on which you want your installation to run: 10000 ``` -------------------------------- ### Registering a Form Field in Svelte Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Develop & Scale/custom-plugin/custom-component.md Integrate your custom component with Budibase's form system by registering it as a field. This example shows how to get form context and register a new field with its properties. ```javascript export let field; export let label; export let validation; const component = getContext("component"); const formContext = getContext("form"); const formStepContext = getContext("form-step"); const formApi = formContext?.formApi; $: formStep = formStepContext ? $formStepContext || 1 : 1; $: formField = formApi?.registerField(field, "number", 0, false, validation, formStep); ``` -------------------------------- ### Budibase Backup Environment File Example Source: https://github.com/budibase/docs/blob/v4.0.0/docs/References/budibase-cli-reference.md This is an example of an `.env` file used with the `budi backups` command. It contains essential credentials and configuration for CouchDB and MinIO object storage, as well as the main port for the Budibase instance. ```shell COUCH_DB_URL=http://admin:admin@localhost:10000/db/ MINIO_ACCESS_KEY=mykey MINIO_SECRET_KEY=mysecret MINIO_URL=http://localhost:10000 MAIN_PORT=10000 ``` -------------------------------- ### Access SDK Context in Svelte Component Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Develop & Scale/custom-plugin/custom-component.md Example of how to access the Budibase SDK context within a Svelte component to get access to styling utilities and the API. The 'sdk' key is used to retrieve these. ```javascript const { styleable, API } = getContext("sdk") ``` -------------------------------- ### Initialize a Budibase Plugin Component Source: https://github.com/budibase/docs/blob/v4.0.0/recipes/create-a-budibase-plugin.md Use the Budibase CLI to initialize a new plugin component. This command prompts for essential plugin details like name, description, and version, then creates the plugin directory and installs dependencies. ```shell budi plugins --init component Lets get some details about your new plugin: ? Name star-rating ? Description A star rating Budibase component ? Version 1.0.0 By default the plugin will be created in the directory "star-rating" if you are already in an empty directory, such as a new Git repo, you can disable this functionality. ? Create top level directory? Y Retrieving project... Installing dependencies... Plugin created in directory "star-rating" ``` -------------------------------- ### Budibase CLI Export Interactive Prompts and Output Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/server-migration.md Example of the interactive prompts and output during a Budibase installation export when no environment file is provided. This shows the questions asked and the final generated export file name. ```text *** NOTE: use a .env file to load these parameters repeatedly *** ? MAIN_PORT 10000 ? COUCH_DB_URL http://:@localhost:10000/db/ ? MINIO_URL http://localhost:10000/ ? MINIO_ACCESS_KEY ? MINIO_SECRET_KEY CouchDB Export ████████████████████████████████████████ 100% | ETA: 0s | 9/9 S3 Export ████████████████████████████████████████ 100% | ETA: 0s | 14/14 Generated export file - backup-2022-09-01T18:42:25.104Z.tar.gz ``` -------------------------------- ### Create a Google Cloud Project Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/google-cloud-run.md Create a new Google Cloud project to host your Budibase deployment. Optionally specify a parent folder and labels. ```bash gcloud projects create $PROJECT_NAME --name="My Dev Budibase" --folder=123987111222 --labels=terraform=false ``` -------------------------------- ### Create Google Filestore Instance Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/google-cloud-run.md Provision a Filestore instance for persistent storage. Configure the tier, file share name, capacity, and network. The tier can be adjusted for latency and cost. ```bash gcloud beta filestore instances create $PROJECT_NAME \ --project=$PROJECT_NAME --zone=$ZONE --tier=BASIC_HDD \ --file-share=name="$PROJECT_NAME",capacity=1TB \ --network=name="default" ``` -------------------------------- ### Download Budibase Docker Setup Files Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/windows-server.md Downloads the docker-compose.yaml and .env configuration files for Budibase from the official GitHub repository. ```bash curl -L https://raw.githubusercontent.com/Budibase/budibase/master/hosting/docker-compose.yaml -o docker-compose.yaml curl -L https://raw.githubusercontent.com/Budibase/budibase/master/hosting/.env -o .env ``` -------------------------------- ### MySQL Client Connection Configuration Source: https://github.com/budibase/docs/blob/v4.0.0/docs/References/contributing-to-budibase/writing-your-own-external-data-connector.md Example of how to configure the MySQL client connection using connection details. ```javascript const connection = mysql.createConnection({ host : 'localhost', user : 'me', password : 'secret', database : 'my_db' }); ``` -------------------------------- ### Install Dependencies in Ubuntu for WSL2 Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/windows-server.md Installs the curl package within the Ubuntu environment running under WSL2. ```bash sudo apt update sudo apt install -y curl ``` -------------------------------- ### Event Property: Tenant ID Example Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Settings/event-reference.md Example of the 'tenantId' property, a globally unique identifier for the tenant. ```text 2d714b1745b1-40d7b36f539e214d8170_default ``` -------------------------------- ### Initialize Budibase Plugin Source: https://github.com/budibase/docs/blob/v4.0.0/docs/References/budibase-cli-reference.md Initializes a new Budibase plugin (datasource or component) by pulling the project skeleton and setting it up in the current working directory. ```shell # datasource budi plugins --init datasource # component budi plugins --init component ``` -------------------------------- ### Example Budibase Metrics Output Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Settings/metrics.md This is an example of the OpenMetrics formatted output you can expect from the Budibase metrics endpoint. ```text # HELP budibase_os_uptime Time in seconds that the host operating system has been up. # TYPE budibase_os_uptime counter budibase_os_uptime 14474.22 # HELP budibase_os_free_mem Bytes of memory free for usage on the host operating system. # TYPE budibase_os_free_mem gauge budibase_os_free_mem 4614631424 # HELP budibase_os_total_mem Total bytes of memory on the host operating system. # TYPE budibase_os_total_mem gauge budibase_os_total_mem 16663404544 # HELP budibase_os_used_mem Total bytes of memory in use on the host operating system. # TYPE budibase_os_used_mem gauge budibase_os_used_mem 12048773120 # HELP budibase_os_load1 Host operating system load average. # TYPE budibase_os_load1 gauge budibase_os_load1 2.28 # HELP budibase_os_load5 Host operating system load average. # TYPE budibase_os_load5 gauge budibase_os_load5 2.1 # HELP budibase_os_load15 Host operating system load average. # TYPE budibase_os_load15 gauge budibase_os_load15 1.94 # HELP budibase_tenant_user_count The number of users created. # TYPE budibase_tenant_user_count gauge budibase_tenant_user_count 1 # HELP budibase_tenant_app_count The number of apps created by a user. # TYPE budibase_tenant_app_count gauge budibase_tenant_app_count 1 # HELP budibase_tenant_production_app_count The number of apps a user has published. # TYPE budibase_tenant_production_app_count gauge budibase_tenant_production_app_count 0 # HELP budibase_tenant_dev_app_count The number of apps a user has unpublished in development. # TYPE budibase_tenant_dev_app_count gauge budibase_tenant_dev_app_count 1 # HELP budibase_tenant_db_count The number of couchdb databases including global tables such as _users. # TYPE budibase_tenant_db_count gauge budibase_tenant_db_count 5 # HELP budibase_quota_usage_apps The number of apps created. # TYPE budibase_quota_usage_apps gauge budibase_quota_usage_apps 1 # HELP budibase_quota_limit_apps The limit on the number of apps that can be created. # TYPE budibase_quota_limit_apps gauge budibase_quota_limit_apps 3000000 # HELP budibase_quota_usage_rows The number of database rows used from the quota. # TYPE budibase_quota_usage_rows gauge budibase_quota_usage_rows 0 # HELP budibase_quota_limit_rows The limit on the number of rows that can be created. # TYPE budibase_quota_limit_rows gauge budibase_quota_limit_rows 3000000 # HELP budibase_quota_usage_plugins The number of plugins in use. # TYPE budibase_quota_usage_plugins gauge budibase_quota_usage_plugins 0 ``` -------------------------------- ### Create OIDC Environment File Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Develop & Scale/microfrontend-example.md Copy the example environment file to create your own `.env` file for OIDC bridge mode configuration. ```bash cp .env.oidc.example .env ``` -------------------------------- ### Embed Interactive Example Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Getting started/examples-and-guides/cascading-dropdown-filters.md Embed an interactive example of cascading dropdown filtering directly into your documentation or application. ```html ``` -------------------------------- ### Start Budibase with Docker Compose Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/docker-compose.md This command starts the Budibase cluster using the configurations defined in docker-compose.yaml. It downloads necessary images and sets up the network for the services. This may take some time. ```shell docker-compose up ``` -------------------------------- ### Create Budibase Directory Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/windows-server.md Creates a directory named 'budibase' in the user's home directory and navigates into it, preparing for Budibase setup. ```bash mkdir -p ~/budibase cd ~/budibase ``` -------------------------------- ### Example of withSort Helper Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Bindings/helpers/array-helpers.md This example sorts a simple array of characters alphabetically and renders them concatenated. ```Text HandleBars {{#withSort ['b', 'a', 'c']}} {{this}} {{/withSort}} ``` -------------------------------- ### Elasticsearch Update Query Example Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Data/data-sources/elasticsearch.md An example query structure for updating fields of an existing document in Elasticsearch. ```json { "doc": { "name": "New Name" } } ``` -------------------------------- ### Update Works Start Date by Subtracting Duration Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Getting started/examples-and-guides/update-date-field-on-change.md When the 'Works Start' date picker changes, this action subtracts the value from the 'Duration' field to set the 'Works Start' date. It uses a custom JavaScript function to subtract days from a date. ```javascript //Source: https://stackoverflow.com/questions/563406/how-to-add-days-to-date Date.prototype.subtractDays = function(days) { var date = new Date(this.valueOf()); date.setDate(date.getDate() - days); return date; } return new Date($("Field Value")).subtractDays($("Jobs Form.Fields.Duration")); ``` -------------------------------- ### Initialize Custom Datasource Plugin Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Develop & Scale/custom-plugin/custom-datasource.md Use the Budibase CLI to initialize a new datasource plugin template. This command sets up the basic project structure for your custom integration. ```shell budi plugins --init datasource ``` -------------------------------- ### Display Budibase CLI Help Source: https://github.com/budibase/docs/blob/v4.0.0/docs/Self-hosting/hosting-methods/budibase-cli-setup.md Shows the available commands and options for the Budibase CLI. This is useful for exploring its capabilities. ```bash budi help ```