<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Use jsreport without running it as a server]]></title><description><![CDATA[<p>Hi</p>
<p>I wonder if jsreport can used without running it as a server.</p>
<p>In my case I have a backend (nest.js) with some api’s used by my frontend (quasar.js). My backend, when running locally on my machine, everything works just fine, using the jsreport package and initializing jsreport like this:</p>
<pre><code class="language-js">  static async init(port: number) {
    this._jsReporter = new jsreport.Reporter({
      httpPort: port,
      httpsPort: null, 
      authentication: {
        enabled: false
      }
    })

    this._jsReporter.init().then(() =&gt; {
      console.log('\x1b[32mReporter\x1b[0m is listening on port', this._port)
      this._ready = true
    })
  } 
</code></pre>
<p>and render reports like this:</p>
<pre><code class="language-js">if (this._ready) return this._jsReporter.render( { template: { … } } ) // Returns a PDF file
else { ... }
</code></pre>
<p>But when I deploy to Azure (as a Web App), my backend fails when calling jsReport.init(), with errors related to the port I use, it seems.</p>
<p>I wonder, if jsReport can be used without having it running as a Server, but e.g. just as function like this:</p>
<pre><code class="language-js">import * as jsreport from 'jsreport'

const options = { ... }
return jsreport.render( { template: { … } }, options ) // Returns a PDF file
</code></pre>
<p>Where no port in options are needed. That would be super simple (and cool).</p>
<p>Thanks for any advise.</p>
]]></description><link>https://forum.jsreport.net/topic/2725/use-jsreport-without-running-it-as-a-server</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 23:17:37 GMT</lastBuildDate><atom:link href="https://forum.jsreport.net/topic/2725.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 06 Mar 2023 16:00:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Use jsreport without running it as a server on Mon, 06 Mar 2023 16:02:17 GMT]]></title><description><![CDATA[<p>Hi</p>
<p>I wonder if jsreport can used without running it as a server.</p>
<p>In my case I have a backend (nest.js) with some api’s used by my frontend (quasar.js). My backend, when running locally on my machine, everything works just fine, using the jsreport package and initializing jsreport like this:</p>
<pre><code class="language-js">  static async init(port: number) {
    this._jsReporter = new jsreport.Reporter({
      httpPort: port,
      httpsPort: null, 
      authentication: {
        enabled: false
      }
    })

    this._jsReporter.init().then(() =&gt; {
      console.log('\x1b[32mReporter\x1b[0m is listening on port', this._port)
      this._ready = true
    })
  } 
</code></pre>
<p>and render reports like this:</p>
<pre><code class="language-js">if (this._ready) return this._jsReporter.render( { template: { … } } ) // Returns a PDF file
else { ... }
</code></pre>
<p>But when I deploy to Azure (as a Web App), my backend fails when calling jsReport.init(), with errors related to the port I use, it seems.</p>
<p>I wonder, if jsReport can be used without having it running as a Server, but e.g. just as function like this:</p>
<pre><code class="language-js">import * as jsreport from 'jsreport'

const options = { ... }
return jsreport.render( { template: { … } }, options ) // Returns a PDF file
</code></pre>
<p>Where no port in options are needed. That would be super simple (and cool).</p>
<p>Thanks for any advise.</p>
]]></description><link>https://forum.jsreport.net/post/11799</link><guid isPermaLink="true">https://forum.jsreport.net/post/11799</guid><dc:creator><![CDATA[SolunaSoftware]]></dc:creator><pubDate>Mon, 06 Mar 2023 16:02:17 GMT</pubDate></item><item><title><![CDATA[Reply to Use jsreport without running it as a server on Invalid Date]]></title><description><![CDATA[<p>The <code>express</code> extension is the one that starts the web server and you just need to disable it. To speed things up you can disable the <code>studio</code> or other extensions you don't need as well.</p>
<pre><code>const jsreport = require('jsreport')({
    extensions: {
        express: { enabled: false },
        studio: { enabled: false }
    }
})
await jsreport.init()
</code></pre>
<p>Updated docs:<br />
<a href="https://jsreport.net/learn/adapting-jsreport#running-without-web-server" rel="nofollow">https://jsreport.net/learn/adapting-jsreport#running-without-web-server</a></p>
]]></description><link>https://forum.jsreport.net/post/11801</link><guid isPermaLink="true">https://forum.jsreport.net/post/11801</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Use jsreport without running it as a server on Fri, 10 Mar 2023 12:31:52 GMT]]></title><description><![CDATA[<p><s>Thank you! I can confirm it works perfectly! 💪</s></p>
<p>When I test it, after my solution is deployed to Azure, it returns this error:</p>
<pre><code class="language-js">spawn UNKNOWNat ChildProcess.spawn (node:internal/child_process:413:11)at Object.spawn (node:child_process:700:9)at BrowserRunner.start (C:\home\site\wwwroot\node_modules\puppeteer\lib\cjs\puppeteer\node\BrowserRunner.js:119:34)at ChromeLauncher.launch (C:\home\site\wwwroot\node_modules\puppeteer\lib\cjs\puppeteer\node\ChromeLauncher.js:76:16)at async createBrowser (C:\home\site\wwwroot\node_modules\@jsreport\jsreport-chrome-pdf\lib\chromePoolStrategy.js:98:26)at async allocateBrowser (C:\home\site\wwwroot\node_modules\@jsreport\jsreport-chrome-pdf\lib\chromePoolStrategy.js:113:5)at async getBrowser (C:\home\site\wwwroot\node_modules\@jsreport\jsreport-chrome-pdf\lib\chromePoolStrategy.js:23:30)at async module.exports (C:\home\site\wwwroot\node_modules\@jsreport\jsreport-chrome-pdf\lib\conversion.js:11:19)at async execute (C:\home\site\wwwroot\node_modules\@jsreport\jsreport-chrome-pdf\lib\chromePoolStrategy.js:20:22)at async C:\home\site\wwwroot\node_modules\@jsreport\jsreport-chrome-pdf\lib\lazyRecipe.js:61:20 {errno: -4094,code: 'UNKNOWN',syscall: 'spawn',logged: true,previousOperationId: 'bdjcmdtyp5aaqey'}
</code></pre>
<p>Any idea of what goes wrong?</p>
]]></description><link>https://forum.jsreport.net/post/11809</link><guid isPermaLink="true">https://forum.jsreport.net/post/11809</guid><dc:creator><![CDATA[SolunaSoftware]]></dc:creator><pubDate>Fri, 10 Mar 2023 12:31:52 GMT</pubDate></item><item><title><![CDATA[Reply to Use jsreport without running it as a server on Fri, 10 Mar 2023 13:23:48 GMT]]></title><description><![CDATA[<p>My problem may be related to this: <a href="https://forum.jsreport.net/topic/2713/jsreport-single-file-executable-exe-versioning-issue-need-stable-exe-version/4">https://forum.jsreport.net/topic/2713/jsreport-single-file-executable-exe-versioning-issue-need-stable-exe-version/4</a></p>
<p>and perhaps this (but I hope not 😯): <a href="https://social.msdn.microsoft.com/Forums/en-US/00ea29db-7e4c-4b46-ad25-4b3993832ac3/azure-function-app-windows-os-cannot-launch-chrome-via-puppeteerlaunch-chromium?forum=AzureFunctions" rel="nofollow">https://social.msdn.microsoft.com/Forums/en-US/00ea29db-7e4c-4b46-ad25-4b3993832ac3/azure-function-app-windows-os-cannot-launch-chrome-via-puppeteerlaunch-chromium?forum=AzureFunctions</a></p>
<p>I do not known how to fix it. Please help. Thanks.</p>
]]></description><link>https://forum.jsreport.net/post/11827</link><guid isPermaLink="true">https://forum.jsreport.net/post/11827</guid><dc:creator><![CDATA[SolunaSoftware]]></dc:creator><pubDate>Fri, 10 Mar 2023 13:23:48 GMT</pubDate></item><item><title><![CDATA[Reply to Use jsreport without running it as a server on Invalid Date]]></title><description><![CDATA[<p>Chrome didn't run on the plain windows azure web apps the last time I checked.</p>
<p>I'm afraid you need to use the Linux-based web app in azure or docker-based web app.</p>
]]></description><link>https://forum.jsreport.net/post/11831</link><guid isPermaLink="true">https://forum.jsreport.net/post/11831</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>