Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

After generating a new folder with the instrumented code of your Front-End application, the content of this folder needs to be deployed instead of your original code on the server for the client browser to work against. Below, you’ll find several Best Practices in use among Sealights customers:

Table of Contents
Note

In the sample commands below, we refer to your application’s artifact as dist folder, as a default.
Please make sure to update the command according to your specific configuration, and replace the parameter with the path relevant to your project's settings. For example: apps, code, js,…

Deploying the folder containing the instrumented code

For example, if your original folder was named ‘dist 'dist' and the new folder with the instrumented code is 'sl_dist’, you can follow the steps below:

  1. Rename the original folder from ‘dist’ to ‘dist_original

    Code Block
    Windows OS:
    rename dist dist_original
    
    Linux/Unix OS:
    mv dist dist_original
  2. Use the instrumented folder instead of using one of the following options by renaming the ‘sl_dist’ to ‘dist

    Code Block
    Windows OS:
    rename sl_dist dist
    
    Linux/Unix OS:
    mv sl_dist dist

...

Another solution is to execute the slnodejs build --instrumentForBrowsers command with a generic labid that is replaced in the JS files (string operation) prior to the artefact artifact deployment in each environment

...