wpill

MoNoApps Watch Pill

Usage no npm install needed!

<script type="module">
  import wpill from 'https://cdn.skypack.dev/wpill';
</script>

README

Watch For Express

This is a little tool to extract data from 'req' and prepare for save it as a JSON.

Tests

mocha

Usage

Start database

mongod --dbpath ....../data/wpill

Next sample intercepts all request:

var express = require('express');
var app = express();

//Utils
var WPill = require('wpill').WPill;
var wpill =  new WPill("mongodb://127.0.0.1/wpill")

app.all('*', function(req, res, next){
  wpill.What(req,'page_view');
  next();
});