@xevaltan/dynamiccontent
v1.0.2
Published
change your website dynamic with express and dyanmiccontent
Downloads
2
Readme
DynamicContent with express
Example
const dc = require("dynamiccontent").default;
const fs = require("fs");
const contentPageIndex = fs.readFileSync(
`${__dirname}/components/index.html`,
"utf-8"
);
const express = require("express");
const app = express();
app.get("/", (req, res) => {
const aDynamicPage = new dc(contentPageIndex);
aDynamicPage
.replace("<%=views%>", "10")
.replace("<%=username%>", "Username321");
res.send(aDynamicPage.getEditedContent());
});