ri-zhi-yi
v3.0.0
Published
NPM package for upload your log to https://www.rizhiyi.com/
Downloads
7
Readme
Rizhiyi log npm package
Really easy to use. Right?
var express = require('express');
const bodyParser = require('body-parser');
var RiZhiYi = require('ri-zhi-yi');
var app = express();
app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());
RiZhiYi.setupBulkToken('602a1e24bd7******b1e2b5f5bd214ff');
app.post('/add/log', function (req, res) {
var tag = req.body.tag;
var theLog = req.body.log;
RiZhiYi.log(tag, theLog, function (response) {
res.send(response);
});
});
var server = app.listen(7001, function () {
var host = server.address().address;
var port = server.address().port;
console.log("Log app listening at http://%s:%s", host, port)
});