* Gets the HTML to display the magic mirror. * @param {Request} req - the request * @param {Response} res - the result
(req, res)
| 188 | * @param {Response} res - the result |
| 189 | */ |
| 190 | function 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. |