web-analyst

3.5.2 • Public • Published

Web-Analyst

Web Analyst is a plugin for Genserve.

1. Installation

npm install web-analyst



2. Notes



3. Usage

Install Genserve
$> npm install genserve -g

Install Web-analyst
$> npm install web-analyst

Create a genserve config file and add a plugin section
{
  "plugins": [
    {
      "name": "web-analyst",
      "modulename": "web-analyst@latest",
      "pages": [
        ".*\\.html\\b",
        "\\/$"
      ],
      "earnings": [
        "\\?p=(.*)"
      ],
      "ignore": [
        "something.html"
      ],
      "users": {
        "admin": {
          "password": "admin"
        },
        "some-email@example.com": {
          "password": "secret"
        }
      }
    }
  ]
}

All values are optional apart from the name

  • name : Plugin name (required)
  • modulename : Plugin version to install
  • pages : Regex list for defining which pages need to be taken into account in the statistics
  • earning : Pattern to identify earnings
  • ignore : Pattern to identify pages to ignore
  • users : Users allowed to the statistic area. Default => user:admin password:admin
  • credentials: Path to a .cjs file containing allowed user list .i.e "/path/to/credentials.cjs" (The above field has precedence over this one)

Content Example for "credentials.cjs"
module.exports = {
  "admin": {
    "password": "admin"
  }
};


4. Preview

Screenshot

Package Sidebar

Install

npm i web-analyst

Weekly Downloads

9

Version

3.5.2

License

MIT

Unpacked Size

1.43 MB

Total Files

62

Last publish

Collaborators

  • thimpat