Everything should be measurable !
$ yarn
$ node main.js
REDIS_HOST
: redis hostname (127.0.0.1)REDIS_PORT
: redis port (6379)HMAC_SECRET
: hmac md5 algo secretONLINE_WINDOW
: window time period of online usersHTTP_PORT
: http server port
$.getJSON("http://[your-web-counter]/hit/[webid-number]/[hmac-signature]", function( data ) {
console.log(data);
// Use data to render to UI
});
Or
$.ajax({
url: "http://[your-web-counter]/hit/[webid-number]/[hmac-signature]",
dataType: "jsonp",
jsonpCallback: "[callback_function_name]",
}, function( data ) {
console.log(data);
// Use data to render to UI
});
The MIT License (MIT)
Copyright (c) 2018 Khanh Nguyen