Platform specifics
Node Js
Introduction
The easiest way to set up licensing in your Node JS application is by using our Node SDK. It’s available on the link below:
Getting started
Installation
Key Verification
To verify a license key, you can use the code below. The RSAPublicKey, token and the product id can be found on this page.
Offline activation (saving/loading licenses)
Assuming the license key verification was successful, we can save the result in a file so that we can use it instead of contacting Cryptolens.
First, we need to add the reference to the helper methods:
We can now proceed and save it as a string.
When loading it back, we can use the code below:
If you want to make sure that the license file is not too old, you can specify the maximum number of days as shown below (after 30 days, this method will return null).