license-lib/example/client-example.js

11 lines
277 B
JavaScript

// 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);
})();