https://github.com/keygen-sh/example-node-machine-activation
An example implementation of a typical machine activation flow using Keygen
https://github.com/keygen-sh/example-node-machine-activation
code-sample license-activation license-keys licensing node-locked platform-example software-licensing
Last synced: 3 months ago
JSON representation
An example implementation of a typical machine activation flow using Keygen
- Host: GitHub
- URL: https://github.com/keygen-sh/example-node-machine-activation
- Owner: keygen-sh
- License: mit
- Created: 2018-03-26T22:42:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-08-31T04:44:26.000Z (about 2 years ago)
- Last Synced: 2025-06-30T00:38:31.454Z (3 months ago)
- Topics: code-sample, license-activation, license-keys, licensing, node-locked, platform-example, software-licensing
- Language: JavaScript
- Homepage: https://keygen.sh
- Size: 14.6 KB
- Stars: 7
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Example Machine Activation
This is an example of a typical machine activation flow. You may of course
choose to implement a different flow if required - this only serves as an
example implementation.## Running the example
First up, configure a few environment variables:
```bash
# Your Keygen account ID. Find yours at https://app.keygen.sh/settings.
export KEYGEN_ACCOUNT_ID="YOUR_KEYGEN_ACCOUNT_ID"
```You can either run each line above within your terminal session before
starting the app, or you can add the above contents to your `~/.bashrc`
file and then run `source ~/.bashrc` after saving the file.Next, install dependencies with [`yarn`](https://yarnpkg.comg):
```bash
yarn
```## Activating/deactivating a machine
To perform a machine activation or a deactivation, run the script and
supply a valid license key:```bash
yarn start
```If the current machine has already been activated, you will be prompted
to deactivate it.To use `demo` credentials, you can run the following:
```bash
KEYGEN_ACCOUNT_ID=demo yarn start
```Enter `C1B6DE-39A6E3-DE1529-8559A0-4AF593-V3` when prompted.
## Questions?
Reach out at [support@keygen.sh](mailto:support@keygen.sh) if you have any
questions or concerns!