Dev Center
Table of contents

Deployment Activation

Deployment: Self-hosted, Offline, or Intranet

The following steps guide you through how to deploy the library on your own server.

Step One: Deploy the dist folder

Locate the dist/ directory under the installation folder of the library and simply copy the entire directory to your server. The dist/ folder should contain the following files:

  • dbr.js // For <script>
  • dbr.browser.mjs // For <script type="module">
  • dbr.scanner.html // Scanner default UI
  • dbr-<version>.worker.js // A worker thread for decoding
  • dbr-<version>.wasm.js // Compact Edition JS
  • dbr-<version>.wasm // Compact Edition WASM
  • dbr-<version>.full.wasm.js // Full Edition JS
  • dbr-<version>.full.wasm // Full Edition WASM

If the resource files (e.g.,wasm files) are not placed in the same directory as dbr.js, you will need to specify the path using the API engineResourcePath before calling loadWasm or createInstance.

Dynamsoft.BarcodeReader.engineResourcePath = "url/to/the/dir/";

Step Two: Configure the Server

Set the MIME type for .wasm to application/wasm.

Different servers are configured differently. Here are some popular ones:

  • NGINX: mime.types
  • IIS: Web.config
  • Java™ EE web app: web.xml
  • Node.js: npm mime

License Activation

A full license is required for deployment. If you have not purchased a license yet, please visit our online store.

Step One : Create a Dynamsoft account

If you don’t have an Dynamsoft account yet, sign up here. Be sure to use the same email that was registered for the purchase.

Step Two : Log into Dynamsoft Customer Portal

Once logged in, click License in the left menu bar to show your purchased license(s).

Step Three : Activate the License

Under Status, click Activate Now to specify a domain to bind your license key. The domain binding is a security feature to protect your license, optional but highly recommended.

A few examples of the domain:

  • www.dynamsoft.com
  • demo.dynamsoft.com
  • *.dynamsoft.com
  • *.dynamsoft.com; *.yoursite.com

Step Four : Use the License

<!-- Please visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=guide&product=dbr&package=js to get a trial license. -->
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.5.0-v1/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>

In the above sample code, simply replace PRODUCT-KEYS with your activated key.

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

version 7.5.0

  • Latest version(10.2.10)
  • Version 10.x
    • Version 10.0.21
    • Version 10.0.20
  • Version 9.x
    • Version 9.6.40
    • Version 9.6.33
    • Version 9.6.32
    • Version 9.6.31
    • Version 9.6.30
    • Version 9.6.21
    • Version 9.6.20
    • Version 9.6.11
    • Version 9.6.10
    • Version 9.6.2
    • Version 9.6.1
    • Version 9.6.0
    • Version 9.3.1
    • Version 9.3.0
    • Version 9.2.13
    • Version 9.2.12
    • Version 9.2.11
    • Version 9.0.2
    • Version 9.0.1
    • Version 9.0.0
  • Version 8.x
    • Version 8.8.7
    • Version 8.8.5
    • Version 8.8.3
    • Version 8.8.0
    • Version 8.6.3
    • Version 8.6.0
    • Version 8.4.0
    • Version 8.2.5
    • Version 8.2.3
    • Version 8.2.1
    • Version 8.2.0
    • Version 8.1.3
    • Version 8.1.2
    • Version 8.1.0
    • Version 8.0.0
  • Version 7.x
    • Version 7.6.0
    • Version 7.5.0
Change +