Here's a sample usage:
const express = require('express');
let enc = require('htmldocparser').enc;
const app = express();
app.get('/', (req, res) => {
res.send(enc('Parser Test', "hello world!"));
});
app.listen(3000, () => {
console.log('server started');
});
enc(title, content, head, navigation, defaultstyle);
The title of your document.
The actual document content.
Optional Additional HTML content in the head tag. For example:
<link rel="stylesheet" href="style.css" />
Optional A navigation bar that shows above your content.
Optional If true, will activate a default CSS style.