### Run Development Server for Documentation (English) Source: https://github.com/revealbi/documentation/blob/master/README.md Starts the development server for the documentation in English. This command is used to preview the documentation locally during development. ```bash npm start ``` -------------------------------- ### Run Development Server for Documentation (Japanese) Source: https://github.com/revealbi/documentation/blob/master/README.md Starts the development server for the documentation in Japanese. This command allows viewing the localized version of the documentation locally. ```bash npm run start:ja ``` -------------------------------- ### Complete Program.cs Example with Reveal AI and OpenAI (C#) Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/install-server-sdk.md A comprehensive example of `Program.cs` demonstrating the configuration of CORS, base Reveal SDK, and Reveal AI with the OpenAI provider. Includes settings for local file storage. ```csharp using Reveal.Sdk; using Reveal.Sdk.AI; var builder = WebApplication.CreateBuilder(args); // Add CORS for cross-origin requests builder.Services.AddCors(options => { options.AddDefaultPolicy(policy => { policy.WithOrigins("http://localhost:4200") .AllowAnyMethod() .AllowAnyHeader(); }); }); // Add base Reveal SDK builder.Services.AddControllers().AddReveal(revealBuilder => { revealBuilder.AddSettings(settings => { settings.LocalFileStoragePath = "Data"; }); }); // Add Reveal AI with OpenAI provider builder.Services.AddRevealAI() .ConfigureOpenAI(options => { options.ApiKey = builder.Configuration["OpenAI:ApiKey"]; options.ModelId = "gpt-4.1"; }); var app = builder.Build(); app.UseCors(); app.MapControllers(); app.Run(); ``` -------------------------------- ### Initialize Node.js Project and Install Dependencies Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-server-node-typescript.md This snippet covers the initial setup of a Node.js project, including creating a directory, initializing npm, and installing essential packages like express, TypeScript, nodemon, and ts-node. It also includes configuring TypeScript. ```bash mkdir reveal-server-node cd reveal-server-node npm init -y npm install express npm install typescript @types/node @types/express @types/cors --save-dev npm install nodemon ts-node --save-dev npx tsc --init --rootDir src --outDir dist ``` -------------------------------- ### Install Project Dependencies with npm Source: https://github.com/revealbi/documentation/blob/master/README.md Installs all necessary project dependencies using npm. This command should be run after cloning or forking the repository. ```bash npm install ``` -------------------------------- ### Navigate to Angular App Directory and Open in VS Code Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-angular.md These commands change the current directory to the newly created 'getting-started' Angular application and then open the project in Visual Studio Code. This is a common workflow for starting development. ```bash cd getting-started code . ``` -------------------------------- ### Run ASP.NET Core Application Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/install-server-sdk.md Command to run the ASP.NET Core application after installation and configuration of the Reveal AI Server SDK. This starts the backend services. ```bash dotnet run ``` -------------------------------- ### Build Documentation for Production Source: https://github.com/revealbi/documentation/blob/master/README.md Builds the documentation for production deployment. This command generates the static assets required to serve the documentation. ```bash npm run build ``` -------------------------------- ### Start Node.js Reveal SDK Server Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-server-node.md This command initiates the Node.js server that hosts the Reveal SDK. Ensure all dependencies are installed and the server code is correctly configured before running this command. ```bash node main.js ``` -------------------------------- ### Create React App with TypeScript Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-react.md This command uses npx to create a new React application with the name 'getting-started' and applies the 'typescript' template. This sets up a basic project structure for a React application using TypeScript. ```bash npx create-react-app getting-started --template typescript ``` -------------------------------- ### Create New Angular App using Angular CLI Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-angular.md This command creates a new Angular project named 'getting-started' using the Angular CLI. It sets up the basic structure for an Angular application. ```bash ng new getting-started ``` -------------------------------- ### Complete index.html with Reveal SDK and Dependencies Source: https://github.com/revealbi/documentation/blob/master/docs/web/install-client-sdk.md This is a complete example of an index.html file that includes the necessary dependencies (Jquery, Day.js) and the Reveal SDK script, all loaded from CDNs or local assets. This serves as a reference for integrating the SDK. ```html Reveal Sdk - HTML/JavaScript ``` -------------------------------- ### Create Project Folders (Bash) Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/getting-started-html.md Creates the necessary 'Dashboards' and 'Data' folders in the project root for organizing dashboard and data files. ```bash mkdir Dashboards mkdir Data ``` -------------------------------- ### Initialize Reveal AI Client SDK in Vanilla JavaScript (UMD Bundle) Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/install-client-sdk.md Initializes the Reveal AI Client SDK using a UMD bundle in Vanilla JavaScript. This example shows how to include the script via CDN and then access the client to initialize it with a host URL. ```html Reveal AI
``` -------------------------------- ### Initialize Reveal AI Client SDK in Vanilla JavaScript (ES Modules) Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/install-client-sdk.md Initializes the Reveal AI Client SDK using ES Modules in a Vanilla JavaScript application. This example demonstrates how to import the client and initialize it with a host URL within an HTML file. ```html Reveal AI
``` -------------------------------- ### Initialize Reveal AI Client SDK in Angular Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/install-client-sdk.md Initializes the Reveal AI Client SDK before bootstrapping the Angular application. This code snippet should be placed in your `main.ts` file to ensure the SDK is ready when the app starts. ```typescript import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { RevealSdkClient } from '@revealbi/api'; import { AppModule } from './app/app.module'; RevealSdkClient.initialize({ hostUrl: 'https://your-server.com' }); platformBrowserDynamic() .bootstrapModule(AppModule) .catch(err => console.error(err)); ``` -------------------------------- ### Create ASP.NET Core Web API Project Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/getting-started-html.md This snippet demonstrates how to create a new ASP.NET Core Web API project using the .NET CLI. This project will serve as the backend for the Reveal SDK AI application. ```bash dotnet new webapi -n RevealAiServer cd RevealAiServer ``` -------------------------------- ### Install Reveal AI Client SDK using npm Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/install-client-sdk.md Installs the Reveal AI Client SDK package using npm. This is the recommended method for most projects. Ensure Node.js and npm are installed. ```bash npm install @revealbi/api ``` -------------------------------- ### Store LLM API Keys in appsettings.json Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/install-server-sdk.md Example of storing LLM provider API keys securely in the `appsettings.json` file. It's crucial to never commit these keys to source control. ```json { "OpenAI": { "ApiKey": "sk-your-api-key-here" }, "Anthropic": { "ApiKey": "sk-ant-your-api-key-here" } } ``` -------------------------------- ### Initialize Reveal AI Client SDK in Vue Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/install-client-sdk.md Initializes the Reveal AI Client SDK before mounting the Vue application. This setup should be done in your `main.ts` file to ensure the SDK is configured before the Vue app is initialized. ```typescript import { createApp } from 'vue'; import { RevealSdkClient } from '@revealbi/api'; import App from './App.vue'; RevealSdkClient.initialize({ hostUrl: 'https://your-server.com' }); createApp(App).mount('#app'); ``` -------------------------------- ### Run NestJS Server Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-server-nest.md Starts the NestJS server. The `npm run start` command runs the application in production mode, while `npm run start:dev` enables live-reload for development. ```bash npm run start ``` ```bash npm run start:dev ``` -------------------------------- ### Create Basic HTML Structure for Reveal SDK Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-javascript.md This snippet provides the fundamental HTML structure required for a Reveal SDK application. It includes the necessary meta tags and a title, serving as the base for embedding the SDK. ```html Reveal Sdk - HTML/JavaScript ``` -------------------------------- ### Install Reveal SDK for Node.js Source: https://github.com/revealbi/documentation/blob/master/docs/web/install-server-sdk.md Installs the reveal-sdk-node package using npm and integrates the Reveal SDK into an Express.js application by adding `app.use('/', reveal());` to the main server file. ```bash npm install reveal-sdk-node ``` ```javascript var express = require('express'); // highlight-next-line var reveal = require('reveal-sdk-node'); const app = express(); // highlight-next-line app.use('/', reveal()); app.listen(8080, () => { console.log(`Reveal server accepting http requests`); }); ``` -------------------------------- ### Initialize Node.js Project and Install Express Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-server-node.md This snippet demonstrates the initial steps to set up a Node.js project. It includes creating a project directory, initializing npm, and installing the express framework, which is essential for building web servers. ```bash mkdir reveal-server-node cd reveal-server-node npm init -y npm install express code . ``` -------------------------------- ### Configure API Key using User Secrets Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/getting-started-html.md This example demonstrates how to securely manage your OpenAI API key during development using the .NET User Secrets feature. It involves initializing user secrets and then setting the API key as a secret. ```bash dotnet user-secrets init dotnet user-secrets set "RevealAI:OpenAI:ApiKey" "sk-your-openai-api-key-here" ``` -------------------------------- ### Get AI Insights (Await Mode) - JavaScript Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/getting-started-html.md Retrieves AI insights from a dashboard using await mode. This method waits for the complete response before returning. It requires the dashboard object and specifies the insight type. ```javascript const result = await client.ai.insights.get({ dashboard: dashboard, insightType: rv.InsightType.Summary }); console.log(result.explanation); ``` -------------------------------- ### Declare jQuery and Initialize RevealView in AppComponent TS Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-angular.md This TypeScript code demonstrates how to declare the global jQuery variable `$` for TypeScript compatibility and initializes the Reveal SDK's `RevealView` within the `ngAfterViewInit` lifecycle hook. It uses a `ViewChild` to get a reference to the HTML container. ```typescript import { AfterViewInit, Component, ElementRef, ViewChild } from '@angular/core'; declare let $: any; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) export class AppComponent implements AfterViewInit { @ViewChild('revealView') el!: ElementRef; ngAfterViewInit(): void { var revealView = new $.ig.RevealView(this.el.nativeElement); } } ``` -------------------------------- ### Start Node.js Development Server Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-server-node-typescript.md This command initiates the Node.js development server using Nodemon. Nodemon monitors the source files and automatically restarts the server when changes are detected, facilitating a rapid development workflow. ```bash npx nodemon src/app.ts ``` -------------------------------- ### Get AI Insights (Streaming Mode) - JavaScript Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/getting-started-html.md Retrieves AI insights from a dashboard using streaming mode for a real-time experience. This method allows for progressive updates via callbacks like onTextChunk and onComplete. It requires the dashboard object, insight type, and stream options. ```javascript const result = await client.ai.insights.get( { dashboard: dashboard, insightType: rv.InsightType.Summary }, { onTextChunk: (text) => { // Append each chunk as it arrives displayInsight(text, true); }, onComplete: () => { console.log('Done!'); } }, { streamExplanation: true } ); ``` -------------------------------- ### Get AI Insights with Streaming and Await Modes (JavaScript) Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/getting-started-html.md This snippet demonstrates how to fetch AI insights using the RevealBI client. It supports both real-time streaming responses and waiting for a complete response. Error handling is included for both modes. Dependencies include the RevealBI client library. ```javascript options.visualizationId = visualizationId; } try { if (streamingEnabled) { // Streaming mode - responses arrive in real-time const result = await client.ai.insights.get( options, { onProgress: (message) => { console.log('Progress:', message); displayInsight(`*${message}*\n\n`, true); }, onTextChunk: (text) => { console.log('Text chunk:', text); displayInsight(text, true); }, onComplete: () => { console.log('Insight complete'); }, onError: (error, details) => { console.error('Error:', error, details); displayInsight(`**Error:** ${error}`); } }, { streamExplanation: true } ); } else { // Await mode - wait for complete response const result = await client.ai.insights.get(options); displayInsight(result.explanation); } } catch (error) { console.error('Error getting insight:', error); displayInsight(`**Error:** ${error.message || error}`); } }); } // Load dashboard and configure menu items $.ig.RVDashboard.loadDashboard("Accounts", (dashboard) => { revealView = new $.ig.RevealView("#revealView"); revealView.canEdit = false; revealView.canSaveAs = false; revealView.dashboard = dashboard; // Add AI insights to context menus revealView.onMenuOpening = function (visualization, args) { // Dashboard-level insights if (args.menuLocation === $.ig.RVMenuLocation.Dashboard) { args.menuItems.push(createInsightMenuItem( "Dashboard Summary", dashboard, rv.InsightType.Summary)); args.menuItems.push(createInsightMenuItem( "Dashboard Analysis", dashboard, rv.InsightType.Analysis)); args.menuItems.push(createInsightMenuItem( "Dashboard Forecast", dashboard, rv.InsightType.Forecast)); } // Visualization-level insights if (args.menuLocation === $.ig.RVMenuLocation.Visualization) { args.menuItems.push(createInsightMenuItem( "Visualization Summary", dashboard, rv.InsightType.Summary, visualization.id)); args.menuItems.push(createInsightMenuItem( "Visualization Analysis", dashboard, rv.InsightType.Analysis, visualization.id)); args.menuItems.push(createInsightMenuItem( "Visualization Forecast", dashboard, rv.InsightType.Forecast, visualization.id)); } }; }); ``` -------------------------------- ### Install NestJS CLI Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-server-nest.md Installs the NestJS command-line interface globally, which is required for creating and managing NestJS projects. ```bash npm install -g @nestjs/cli ``` -------------------------------- ### Generate Translation Strings (Japanese) Source: https://github.com/revealbi/documentation/blob/master/README.md Generates or updates translation strings for the documentation in Japanese. This command ensures that the Japanese localization files are up-to-date. ```bash npm run write-translations:ja ``` -------------------------------- ### Create Minimal DataSourceProvider in C# Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/getting-started-html.md Implements the IRVDataSourceProvider interface to return data source items and data sources unchanged. This is a basic provider for the Reveal SDK. ```csharp using Reveal.Sdk.Data; namespace RevealAiServer.Reveal; public class DataSourceProvider : IRVDataSourceProvider { public Task ChangeDataSourceItemAsync( IRVUserContext userContext, string dashboardId, RVDataSourceItem dataSourceItem) { return Task.FromResult(dataSourceItem); } public Task ChangeDataSourceAsync( IRVUserContext userContext, RVDashboardDataSource dataSource) { return Task.FromResult(dataSource); } } ``` -------------------------------- ### Initialize Reveal SDK in Tomcat ServletContextListener (Java) Source: https://github.com/revealbi/documentation/blob/master/docs/web/install-server-sdk.md This Java code demonstrates how to create a ServletContextListener for Tomcat to initialize the Reveal SDK. The `contextInitialized` method calls `RevealEngineInitializer.initialize()` upon application startup, making the Reveal BI engine available. ```java import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import javax.servlet.annotation.WebListener; import com.infragistics.reveal.engine.init.RevealEngineInitializer; @WebListener public class RevealServletContextListener implements ServletContextListener { @Override public void contextDestroyed(ServletContextEvent ctx) { } @Override public void contextInitialized(ServletContextEvent ctx) { //initialize Reveal RevealEngineInitializer.initialize(); } } ``` -------------------------------- ### Generate Translation Strings (English) Source: https://github.com/revealbi/documentation/blob/master/README.md Generates or updates translation strings for the documentation in English. This is typically used when new content is added or existing content is modified. ```bash npm run write-translations ``` -------------------------------- ### Register DataSourceProvider in Program.cs (C#) Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/getting-started-html.md Configures the Reveal SDK in the application's Program.cs file, registering the custom DataSourceProvider. This step is crucial for the Reveal SDK to function. ```csharp using Reveal.Sdk; using Reveal.Sdk.AI; using RevealAiServer.Reveal; var builder = WebApplication.CreateBuilder(args); builder.Services.AddCors(options => { options.AddPolicy("AllowAll", policy => policy.AllowAnyOrigin() .AllowAnyHeader() .AllowAnyMethod()); }); // Add Reveal SDK with data source provider builder.Services.AddControllers().AddReveal(builder => { builder.AddDataSourceProvider(); }); // Add Reveal AI with OpenAI provider builder.Services.AddRevealAI() .ConfigureOpenAI(options => { options.ApiKey = builder.Configuration["RevealAI:OpenAI:ApiKey"]; options.ModelId = "gpt-4.1"; }); var app = builder.Build(); app.UseCors("AllowAll"); app.MapControllers(); app.Run(); ``` -------------------------------- ### Install Reveal Server SDK (ASP.NET) Source: https://context7.com/revealbi/documentation/llms.txt Installs the Reveal.Sdk.AspNetCore NuGet package and configures the SDK in an ASP.NET Core application's Program.cs file. This enables the server-side functionality for handling dashboards. ```csharp // Program.cs using Reveal.Sdk; var builder = WebApplication.CreateBuilder(args); // Add Reveal SDK to the service collection builder.Services.AddControllers().AddReveal(); var app = builder.Build(); app.MapControllers(); app.Run(); // Note: Create a "Dashboards" folder in your project root to store .rdash files // The SDK will automatically load dashboards from this folder by default ``` -------------------------------- ### Full HTML Client Example with Reveal BI Integration Source: https://github.com/revealbi/documentation/blob/master/docs/web/user-context.md A complete HTML file demonstrating the integration of Reveal BI. It includes HTML select elements for user input, necessary script includes for jQuery and Reveal BI, and JavaScript code to initialize Reveal BI, set base URL, configure the additional headers provider, and handle data source requests with custom headers. ```html Reveal - Parameters and Stored Procs
``` -------------------------------- ### Install Reveal Server SDK (Node.js) Source: https://context7.com/revealbi/documentation/llms.txt Installs the reveal-sdk-node package and configures Express to use the Reveal middleware. This sets up the Node.js server to handle Reveal SDK requests. ```javascript // main.js var express = require('express'); var reveal = require('reveal-sdk-node'); const app = express(); // Add Reveal SDK middleware app.use('/', reveal()); app.listen(8080, () => { console.log('Reveal server accepting http requests on port 8080'); }); // Note: Create a "dashboards" folder in your project root to store .rdash files ``` -------------------------------- ### AI Insights API - Await Mode Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/getting-started-html.md Retrieves AI insights in await mode, waiting for the complete response before proceeding. Suitable for scenarios where immediate full results are needed. ```APIDOC ## POST /api/ai/insights (Await Mode) ### Description Retrieves AI-generated insights for a given dashboard or visualization. This mode waits for the entire insight to be generated before returning the result. ### Method POST ### Endpoint /api/ai/insights ### Parameters #### Request Body - **dashboard** (string) - Required - The ID of the dashboard to analyze. - **insightType** (enum) - Required - The type of insight to retrieve (e.g., Summary). - **visualizationId** (string) - Optional - The ID of a specific visualization within the dashboard to focus the analysis on. ### Request Example ```json { "dashboard": "your_dashboard_id", "insightType": "Summary", "visualizationId": "optional_visualization_id" } ``` ### Response #### Success Response (200) - **explanation** (string) - The generated AI insight explanation. #### Response Example ```json { "explanation": "This insight highlights the key trends and anomalies in your dashboard data." } ``` ``` -------------------------------- ### AI Insights API - Streaming Mode Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/getting-started-html.md Retrieves AI insights in streaming mode, providing real-time updates via callbacks. Ideal for interactive experiences where insights are displayed progressively. ```APIDOC ## POST /api/ai/insights (Streaming Mode) ### Description Retrieves AI-generated insights for a given dashboard or visualization using streaming. This mode allows for real-time processing of insight chunks as they are generated, providing a ChatGPT-like experience. ### Method POST ### Endpoint /api/ai/insights ### Parameters #### Request Body - **dashboard** (string) - Required - The ID of the dashboard to analyze. - **insightType** (enum) - Required - The type of insight to retrieve (e.g., Summary). - **visualizationId** (string) - Optional - The ID of a specific visualization within the dashboard to focus the analysis on. #### Options (Second Argument) - **onTextChunk** (function) - Callback function that receives text chunks as they arrive. - **onComplete** (function) - Callback function that is called when the streaming is complete. #### Options (Third Argument) - **streamExplanation** (boolean) - Required - Set to `true` to enable streaming of the explanation. ### Request Example ```javascript client.ai.insights.get( { dashboard: dashboard, insightType: rv.InsightType.Summary }, { onTextChunk: (text) => { // Append each chunk as it arrives displayInsight(text, true); }, onComplete: () => { console.log('Done!'); } }, { streamExplanation: true } ); ``` ### Response *Note: In streaming mode, the response is handled via callbacks rather than a direct return value.* #### Success Response (200) - **onTextChunk**: Receives partial text of the insight. - **onComplete**: Called upon completion of the insight generation. #### Response Example *No direct JSON response example as data is streamed via callbacks.* ``` -------------------------------- ### Initialize RevealView Component in HTML/JavaScript Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-javascript.md This snippet demonstrates how to initialize the RevealView component within your HTML file. It involves adding a div element to serve as the container for the view and then instantiating the RevealView using JavaScript. ```html
``` -------------------------------- ### Create New NestJS Project Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-server-nest.md Creates a new NestJS project with the specified name. This command initializes a basic project structure for your application. ```bash nest new reveal-nest-server ``` -------------------------------- ### Initialize Reveal View in ASP.NET Core Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-aspnet.md This snippet shows how to add a div element for the Reveal view and initialize the $.ig.RevealView JavaScript object. It requires the Reveal SDK JavaScript library to be included in your project. ```html
@section Scripts { } ``` -------------------------------- ### Configure Reveal SDK Maven Repository for Java Source: https://github.com/revealbi/documentation/blob/master/docs/web/install-server-sdk.md Adds the Reveal BI public Maven repository to the `pom.xml` file, enabling the project to download Reveal SDK artifacts. ```xml reveal.public https://maven.revealbi.io/repository/public ``` -------------------------------- ### Create MS SQL Server Data Source and Item on Client (JavaScript) Source: https://github.com/revealbi/documentation/blob/master/docs/web/datasources.md This example shows how to create a specific data source (MS SQL Server) and its corresponding data source item on the client. It includes setting essential connection properties like host, database, and table, and then passing them to the `RevealDataSources` callback. This approach exposes connection details in the browser, requiring careful security considerations. ```javascript revealView.onDataSourcesRequested = (callback) => { var sqlServerDS = new $.ig.RVSqlServerDataSource(); sqlServerDS.host = "your-db-host"; sqlServerDS.database = "your-db-name"; sqlServerDS.title = "My SQL Server"; var sqlServerDSI = new $.ig.RVSqlServerDataSourceItem(sqlServerDS); sqlServerDSI.title = "My SQL Server Item"; sqlServerDSI.table = "TableName"; callback(new $.ig.RevealDataSources([sqlServerDS], [sqlServerDSI], false)); }; ``` -------------------------------- ### Basic Express Server Setup with Reveal SDK Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-server-node-typescript.md This code sets up a basic Express server in Node.js and integrates the Reveal SDK. It initializes an Express application and uses the reveal-sdk-node middleware to handle Reveal-related requests. ```javascript import express, { Application } from 'express'; import reveal from 'reveal-sdk-node'; const app: Application = express(); app.use("/", reveal()); app.listen(5111, () => { console.log(`Reveal server accepting http requests`); }); ``` -------------------------------- ### Install Reveal Client SDK (HTML) Source: https://context7.com/revealbi/documentation/llms.txt Includes the Reveal JavaScript library and its dependencies (jQuery and Day.js) to enable dashboard rendering in browser applications. This snippet demonstrates how to include the necessary scripts and initialize the RevealView. ```html Reveal SDK Application
``` -------------------------------- ### Add Reveal SDK to ASP.NET Core App Source: https://github.com/revealbi/documentation/blob/master/docs/web/getting-started-aspnet.md This code snippet demonstrates how to add the Reveal SDK to an ASP.NET Core application's services. It requires the Reveal.Sdk NuGet package and modifies the Program.cs file. ```csharp using Reveal.Sdk; builder.Services.AddRazorPages().AddReveal(); ``` -------------------------------- ### Test Reveal AI Providers Endpoint using curl Source: https://github.com/revealbi/documentation/blob/master/docs/web/ai/install-server-sdk.md Tests the `/api/reveal/ai/providers` endpoint to verify the AI SDK is running and can identify configured LLM providers. This uses `curl` to make an HTTP GET request. ```bash curl http://localhost:5000/api/reveal/ai/providers ```