feat(app/web): add index.html [skip ci]

This commit is contained in:
lowlighter
2022-07-05 23:44:00 -04:00
parent 87e2f6ced5
commit 1713f5e47f
10 changed files with 174 additions and 114 deletions

View File

@@ -130,6 +130,8 @@ export default async function({sandbox = false} = {}) {
app.get("/.templates/:template", limiter, (req, res) => req.params.template in conf.templates ? res.status(200).json(conf.templates[req.params.template]) : res.sendStatus(404))
for (const template in conf.templates)
app.use(`/.templates/${template}/partials`, express.static(`${conf.paths.templates}/${template}/partials`))
//Modes
app.get("/.modes", limiter, (req, res) => res.status(200).json(conf.settings.modes))
//Styles
app.get("/.css/style.css", limiter, (req, res) => res.sendFile(`${conf.paths.statics}/style.css`))
app.get("/.css/style.vars.css", limiter, (req, res) => res.sendFile(`${conf.paths.statics}/style.vars.css`))