product authorization helper
On Windows, you'll need to install some dependencies first:
- node-gyp (npm install -g node-gyp)
- python 2.7 and a compatible version Visual Studio installed first. Even with that, node-gyp installation or use can have issues on Windows. The node-gyp README file has detailed instructions if you have difficulties. This post is also a good reference.
npm install pro-auth-helper --save
Requires nodejs >= 0.10.x
var ProAuthHelper = require('pro-auth-helper');
var helper = new ProAuthHelper();
-
filepath —
{string}
— the xx.lic file pathhelper.checkLicenseInfo(filepath, function(err, result){ console.log(result); });
result: {code: 'time',msg: 'Authorization expired'} or {code: 'machine',msg: 'The current machine is not authorized'} or {code: 'ok'}
-
filepath —
{string}
— xx.dat file path -
data —
{object}
— the file content -
result —
{bool}
— The results of the generated file.helper.createDatFile(filepath, {produceId:xxx,username:xxxx,...}, function(err, result){ if(err) { console.log(err); }else{ console.log(result); } });
result: { msg: 'the file Have been generated' }