/NetLicensing-Demo

Labs64 NetLicensing / Demo Application

Primary LanguagePHPMIT LicenseMIT

Innovative License Management Solution

Build Status License

Labs64 NetLicensing Demo Application

This NetLicensing Demo Application provides a simple way to explore basic NetLicensing functionalities, as well as integration options with real application code. Feel free to use code snippets from this project as a help for NetLicensing integration in your own product.

Getting started

With Docker

This project is based on docker-compose. By default, the following containers are started: netlicensing-demo (centos:7 based), nginx. The /var/www/netlicensing-demo directory is the web root which is mapped to the nginx container. You can directly edit configuration files from within the repo as they are mapped to the correct locations in containers.

System Requirements

To be able to run NetLicensing Demo you have to meet the following requirements:

Run

  1. Clone repository
$ git clone https://github.com/Labs64/NetLicensing-Demo.git
  1. Copy .env.example to .env and modify according to your environment
$ cp .env.example .env
  1. Start environment
$ docker-compose up -d
  1. Build project
$ docker exec netlicensing-demo ./dockerfiles/bin/prj-build.sh

Now you can browse the site at http://localhost:80


  1. Stop environment
$ docker-compose down

Without Docker

System Requirements

To be able to run NetLicensing Demo Application you have to meet the following requirements:

  • PHP > 5.6.4
  • PHP Extensions: PDO, cURL, Mbstring, Tokenizer, Mcrypt, XML, GD
  • Node.js > 6.0
  • Composer > 1.0.0

Installation

  1. Install Composer using detailed installation instructions here
  2. Install Node.js using detailed installation instructions here
  3. Clone repository
$ git clone https://github.com/Labs64/NetLicensing-Demo.git
  1. Change into the working directory
$ cd NetLicensing-Demo
  1. Copy .env.example to .env
$ cp .env.example .env

modify keys beginning with NLIC in the .env file with your values:

  • NLIC_BASE_URL - NetLicensing API base URL
  • NLIC_AGENT_BASE_URL - NetLicensing Agent base URL
  • NLIC_AUTH_USERNAME - NetLicensing username
  • NLIC_AUTH_PASSWORD - NetLicensing password
  • NLIC_AUTH_API_KEY - API Key for NetLicensing
  1. Install composer dependencies
$ composer install --prefer-dist
  1. An application key can be generated with the command
$ php artisan key:generate
  1. Execute following commands to install other dependencies
$ npm install
$ npm run dev

Run

To start the PHP built-in server

$ php artisan serve --port=8080
or
$ php -S localhost:8080 -t public/

Now you can browse the site at http://localhost:8080