From 182b7e2f5f28b97d91d48c75066562c7aeee2c77 Mon Sep 17 00:00:00 2001 From: knotteye Date: Tue, 5 Nov 2019 16:30:15 -0600 Subject: [PATCH] Add help page, change base links. Turn off watch in nunjucks config. I do not know if that made it master, hopefully not. --- package-lock.json | 2 +- src/controller.ts | 2 +- src/http.ts | 5 ++++- templates/base.njk | 2 +- templates/help.njk | 16 ++++++++++++++++ 5 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 templates/help.njk diff --git a/package-lock.json b/package-lock.json index cd52619..fefe80b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "satyr", - "version": "0.3.0", + "version": "0.3.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/controller.ts b/src/controller.ts index 461eb8a..593679e 100644 --- a/src/controller.ts +++ b/src/controller.ts @@ -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() { diff --git a/src/http.ts b/src/http.ts index f0ee4ff..02e7e17 100644 --- a/src/http.ts +++ b/src/http.ts @@ -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) => { diff --git a/templates/base.njk b/templates/base.njk index 6fc4453..a7aa9e7 100644 --- a/templates/base.njk +++ b/templates/base.njk @@ -8,7 +8,7 @@
{% block content %} diff --git a/templates/help.njk b/templates/help.njk new file mode 100644 index 0000000..432eb09 --- /dev/null +++ b/templates/help.njk @@ -0,0 +1,16 @@ +{% extends "base.njk" %} +{% block content %} +

+

Chatting

+The webclient for chat can be accessed on the streamer's page, or at https://{{ domain }}/chat

+The following commands are available:
+`/nick kawen (password)` Password is only required if kawen is a registered user.
+`/join kawen` Join the chatroom for kawen's stream and leave the previous room.
+`/kick cvcvcv` Available only in your own room if you are a streamer. Forcefully disconnect the user.
+ +

Streaming

+Users should stream to rtmp://{{ domain }}/stream/Stream-Key

+The stream will be available at rtmp://{{ domain }}/live/username
or at your page on https://{{ domain }}/users/username
+
+Most software, such as OBS, will have a separate field for the URL and stream key, in which case you can enter rtmp://{{ domain }}/stream/ and the stream key in the appropriate field. +{% endblock %} \ No newline at end of file