New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

stats-counter

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stats-counter

Express middleware for counting visits on websites

latest
Source
npmnpm
Version
2.0.2
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

stats-counter

Express middleware for counting visits on websites

Usage

app.use(
  statsCounter(
    {
      visitTime: 10,
      apiPath: '/stats',
      savePath: 'statsSave',
      saveInterval: 60
    }
  )
);

Options

visitTime - required - Visit expiration after last request

apiPath - optional - Path for getting stats

savePath - optional - File for saving stats, stats won't be saved if no path provided

saveInterval - optional (defaults to 60) - Interval in seconds

API

HTTP request to apiPath returns stats in following format:

{
  total: {
    total: <total visit count>
    unique: <unique visit count>
  },
  thisMinute: {...},
  thisHour: {...},
  today: {...},
  thisMonth: {...},
  thisYear: {...}
}

FAQs

Package last updated on 13 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts