v.1.0.0. initial push of license-lib

This commit is contained in:
2025-03-19 09:37:30 -05:00
commit b22a1c973c
20 changed files with 433 additions and 0 deletions

11
example/client-example.js Normal file
View File

@ -0,0 +1,11 @@
// example/client-example.js
const axios = require('axios');
(async () => {
const { data } = await axios.post('http://localhost:3000/validate-license', {
userId: 'user123',
licenseKey: 'your_license_key_here'
});
console.log('License Valid:', data.valid);
})();

13
example/server-example.js Normal file
View File

@ -0,0 +1,13 @@
// example/server-example.js
const axios = require('axios');
(async () => {
const { data } = await axios.post('http://localhost:3000/generate-license', {
userId: 'user123',
licenseType: 'subscription',
tier: 'pro',
validUntil: '2024-12-31'
});
console.log('Generated License:', data.licenseKey);
})();