License Validator is a simple Node.js application built with Express.js. It provides an API endpoint to validate license keys against a predefined list of valid licenses. This project is useful for software that requires license key validation.
- Validate license keys via an API endpoint.
- Easy integration with existing systems.
- Simple and straightforward setup.
- Node.js
- npm (Node Package Manager)
-
Clone the Repository
git clone https://github.com/andresz74/license-validator-main.git cd license-validator-main
-
Install Dependencies
npm install
-
Set Up License Keys
- Create a
licenses.json
file in the root directory. - Add an array of valid license keys. Example:
["key1", "key2", "key3"]
- Create a
-
Start the Server
npm start
The server will start on
http://localhost:3000
. -
Access the Endpoint
- Validate a license key by navigating to
http://localhost:3000/validate-license?key=your_license_key
.
- Validate a license key by navigating to
-
URL
/validate-license
-
Method:
GET
-
URL Params
Required:
key=[string]
-
Success Response:
- Code: 200
Content:OK
- Code: 200
-
Error Response:
- Code: 401 UNAUTHORIZED
Content:KO
- Code: 401 UNAUTHORIZED
Contributions to the License Validator project are welcome!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
file for more information.
Andres Zenteno - [email protected]
Project Link: https://github.com/andresz74/license-validator-main