MCPcopy
hub / github.com/MagicMirrorOrg/MagicMirror / getHtml

Function getHtml

js/server_functions.js:190–196  ·  view source on GitHub ↗

* Gets the HTML to display the magic mirror. * @param {Request} req - the request * @param {Response} res - the result

(req, res)

Source from the content-addressed store, hash-verified

188 * @param {Response} res - the result
189 */
190function getHtml (req, res) {
191 let html = fs.readFileSync(path.resolve(`${global.root_path}/index.html`), { encoding: "utf8" });
192 html = html.replace("#VERSION#", global.version);
193 html = html.replace("#TESTMODE#", global.mmTestMode);
194
195 res.send(html);
196}
197
198/**
199 * Gets the MagicMirror version.

Callers 1

ServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected