mirror of
https://git.waldn.net/git/knotteye/satyr.git
synced 2025-09-16 04:44:57 +00:00
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:
@ -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() {
|
||||
|
@ -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) => {
|
||||
|
Reference in New Issue
Block a user