Add help page, change base links. Turn off watch in nunjucks config.
I do not know if that made it master, hopefully not.merge-requests/1/head
parent
61bf54de95
commit
182b7e2f5f
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "satyr",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="header">
|
||||
<span style="float:left;"><h4><a href="/">{{ sitename }}</a> | <a href="/users">Users</a> <a href="/users/live">Live</a> <a href="/about">About</a></h4></span><span style="float:right;"><h4><a href="/chat">Chat</a> | <a href="/profile">Profile</a></h4></span>
|
||||
<span style="float:left;"><h4><a href="/">{{ sitename }}</a> | <a href="/users">Users</a> <a href="/users/live">Live</a> <a href="/about">About</a></h4></span><span style="float:right;"><h4><a href="/help">Help</a> | <a href="/profile">Profile</a></h4></span>
|
||||
</div>
|
||||
<div id="content">
|
||||
{% block content %}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
{% extends "base.njk" %}
|
||||
{% block content %}
|
||||
<p></p>
|
||||
<h4>Chatting</h4>
|
||||
The webclient for chat can be accessed on the streamer's page, or at <a href="https://{{ domain }}/chat">https://{{ domain }}/chat</a></br></br>
|
||||
The following commands are available:</br>
|
||||
`/nick kawen (password)` Password is only required if kawen is a registered user.</br>
|
||||
`/join kawen` Join the chatroom for kawen's stream and leave the previous room.</br>
|
||||
`/kick cvcvcv` Available only in your own room if you are a streamer. Forcefully disconnect the user.</br>
|
||||
|
||||
<h4>Streaming</h4>
|
||||
Users should stream to <a>rtmp://{{ domain }}/stream/Stream-Key</a></br></br>
|
||||
The stream will be available at <a>rtmp://{{ domain }}/live/username</a> </br>or at your page on <a>https://{{ domain }}/users/username</a></br>
|
||||
</br>
|
||||
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 %}
|
Reference in New Issue