Deploying Instrumented Code
Deploying the folder containing the instrumented code
mv dist dist_original
mv sl_dist dist rename dist dist_original
rename sl_dist distDeploying Instrumentation for several environments (Lab IDs)
Using slnodejs agent
#Build Scan without Instrumentation - Unix
npx slnodejs scan --tokenfile /path/to/sltoken.txt --buildsessionidfile buildSessionId --workspacepath dist --scm git --projectRoot /path/to/source/root
#Instrumentation for first environment (i.e. MyFirstLab)
npx slnodejs scan --tokenfile /path/to/sltoken.txt --buildsessionidfile buildSessionId --labid MyFirstLab --instrumentForBrowsers --instrumentationOnly --workspacepath dist --outputpath sl_dist_MyFirstLab
#Instrumentation for second environment (i.e. My-2nd-Lab)
npx slnodejs scan --tokenfile /path/to/sltoken.txt --buildsessionidfile buildSessionId --labid My-2nd-Lab --instrumentForBrowsers --instrumentationOnly --workspacepath dist --outputpath sl_dist_My-2nd-Lab Using a Search and Replace operation
Validating the Instrumentation and build number in the JS source from the Browser

Last updated
Was this helpful?

