Labs64 / NetLicensing-Demo

Labs64 NetLicensing / Demo Application
https://netlicensing.io
MIT License
6 stars 2 forks source link
api composer demo demo-application docker laas labs64 license licensing-as-a-service licensing-library management netlicensing netlicensing-demo-application netlicensing-io nginx php restful subscription try-and-buy

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
  2. Copy .env.example to .env and modify according to your environment

    $ cp .env.example .env
  3. Start environment

    $ docker-compose up -d
  4. 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:

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
  4. Change into the working directory

    $ cd NetLicensing-Demo
  5. Copy .env.example to .env

    $ cp .env.example .env

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

    • _NLIC_BASEURL - NetLicensing API base URL
    • _NLIC_AGENT_BASEURL - NetLicensing Agent base URL
    • _NLIC_AUTHUSERNAME - NetLicensing username
    • _NLIC_AUTHPASSWORD - NetLicensing password
    • _NLIC_AUTH_APIKEY - API Key for NetLicensing
  6. Install composer dependencies

    $ composer install --prefer-dist
  7. An application key can be generated with the command

    $ php artisan key:generate
  8. 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