Add help page, change base links. Turn off watch in nunjucks config.

I do not know if that made it master, hopefully not.
This commit is contained in:
knotteye
2019-11-05 16:30:15 -06:00
parent 61bf54de95
commit 182b7e2f5f
5 changed files with 23 additions and 4 deletions

View File

@ -2,7 +2,7 @@ import * as mediaserver from "./server";
import * as db from "./database";
import * as api from "./api";
import * as http from "./http";
import * as cleanup from "./cleanup"
import * as cleanup from "./cleanup";
import * as config from "config";
async function run() {

View File

@ -18,7 +18,7 @@ function init(satyr: any, port: number){
njk.configure('templates', {
autoescape: true,
express : app,
watch: true
watch: false
});
njkconf ={
sitename: satyr.name,
@ -89,6 +89,9 @@ function init(satyr: any, port: number){
app.get('/chat', (req, res) => {
res.render('chat.html', njkconf);
});
app.get('/help', (req, res) => {
res.render('help.njk', njkconf);
});
//api handlers
app.post('/api/register', (req, res) => {
api.register(req.body.username, req.body.password, req.body.confirm).then( (result) => {