An Express server can host the Dashboards.JS viewer page and serve dashboard templates from its own routes.

Build the viewer in the served page.
<script src="stimulsoft.reports.js"></script>
<script src="stimulsoft.dashboards.js"></script>
<script src="stimulsoft.viewer.js"></script>

<script>
    var options = new Stimulsoft.Viewer.StiViewerOptions();
    options.appearance.fullScreenMode = true;
    var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);
    viewer.renderHtml("viewer");

    var report = Stimulsoft.Report.StiReport.createNewDashboard();
    report.loadFile('/dashboard');   // served by an Express route
    viewer.report = report;
</script>

How it works. Express acts as the static and template host while the viewer runs in the browser, keeping the server role to routing and file delivery.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.