I am new to node.js and would like to come up with an application using the diff2html package. Could anybody tell me how a minimalistic implementation could look like (perhaps by completing the code below)?
var http = require('http');
var diff2html = require("diff2html").Diff2Html
http.createServer(function (req, res) {
// more code here
}).listen(123456);
There are only two methods, both are described in the documentation.
The lib is for converting a existing diff to html. So there are the two methods getPrettyHtml() and getJsonFromDiff().
I'm not sure what you want to do, but it would be something like: