Skip to content

telemark/minelev-logs-stats

Repository files navigation

Build Status js-standard-style

minelev-logs-stats

Statistics from the MinElev logs

API

GET /stats/total

Get stats for total of logs

GET /stats/total/:type

Get stats for total logs of given type (varsel|samtale|yff)

GET /stats/total/:type/:category

Get stats for total logs of given type (varsel|samtale|yff) filtered by category

GET /stats/total/category/:category

Get stats for total logs of given category

GET /stats/schools

Get stats for schools

GET /stats/schools/:type

Get stats for schools-logs of given type (varsel|samtale|yff)

GET /stats/schools/category/:category

Get stats for schools-logs of given category

GET /stats/classes

Get stats for classes

GET /stats/classes/:type

Get stats for classes-logs of given type (varsel|samtale|yff)

GET /stats/classes/category/:category

Get stats for classes-logs of given category

GET /stats/usage

Get stats for unique users

GET /stats/usage/:type

Get stats for unique users of given type (varsel|samtale|yff)

GET /stats/time/:type/:category

Total milliseconds used to produce documents of types (varsel|samtale|yff) filtered by category (sloooooow)

GET /stats/categories

Get stats for categories

GET /stats/queue

Get number of logs in queue

GET /stats/email

Get stats for number of kopiPrPost yff-bekreftelse-bedrift

GET /stats/students

Get the total number of students (from pifu)

Development

Add a local .env file

MONGODB_CONNECTION=mongodb-connection-string
MONGODB_COLLECTION=mongodb-collection-name
MONGODB_COLLECTION_PIFU=mongodb-collection-name-pifu
MONGODB_NAME=mongodb-db-name
$ npm run dev

Deploy to ZEIT/Now

$ npm run deploy

Related

License

MIT