mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-18 18:29:42 +00:00
17b4f53ba2
* Create server-sent-events.js * Create sse-change-listener.js * Implement server sent events * Convert to ES5 and wrap in function * Use the host string from tiddlyweb * Improve comments in sse-server.js * Can't use object reference as key * Add retry timeout * Fix a bug * bug fix * Fix formatting * Fix ES5 compat * capitalize comments * more fixes * Refactor tiddlywek/sse-server.js * Extract helper functions for handling wikis and connections. * Replace JSDoc comments. * Fix formatting according to TW core. * Simplify the logic for adding and removing connections. * Fix formatting of tiddlyweb/sse-client.js Fix formatting according to TW core. * Fix formatting of server-sent-events.js Fix formatting and comments following TW core guidelines. * Extract a debounce function in sse-client.js * Avoid using startsWith in server-sent-events.js startsWith is part of ES2015, while TiddlyWiki uses the 5.1 dialect. * New sse-enabled WebServer parameter * If not set to "yes", disabled SSE request handling. * Add documentation for the parameter in core/language/en-GB/Help/listen.tid * Add new tiddler editions/tw5.com/tiddlers/webserver/WebServer Parameter_ sse-enabled.tid * Disable polling for changes if SSE is enabled * Add sse_enabled to /status JSON response * Store syncer polling status in $:/config/SyncDisablePolling * Handled disabling polling in core/modules/syncer.js * Simply boolean logic in syncer.js * Delete trailing whitespaces in syncer.js Co-authored-by: Arlen22 <arlenbee@gmail.com>
36 lines
2.1 KiB
Plaintext
36 lines
2.1 KiB
Plaintext
title: $:/language/Help/listen
|
|
description: Provides an HTTP server interface to TiddlyWiki
|
|
|
|
Serves a wiki over HTTP.
|
|
|
|
The listen command uses NamedCommandParameters:
|
|
|
|
```
|
|
--listen [<name>=<value>]...
|
|
```
|
|
|
|
All parameters are optional with safe defaults, and can be specified in any order. The recognised parameters are:
|
|
|
|
* ''host'' - optional hostname to serve from (defaults to "127.0.0.1" aka "localhost")
|
|
* ''path-prefix'' - optional prefix for paths
|
|
* ''port'' - port number on which to listen; non-numeric values are interpreted as a system environment variable from which the port number is extracted (defaults to "8080")
|
|
* ''credentials'' - pathname of credentials CSV file (relative to wiki folder)
|
|
* ''anon-username'' - the username for signing edits for anonymous users
|
|
* ''username'' - optional username for basic authentication
|
|
* ''password'' - optional password for basic authentication
|
|
* ''authenticated-user-header'' - optional name of header to be used for trusted authentication
|
|
* ''readers'' - comma separated list of principals allowed to read from this wiki
|
|
* ''writers'' - comma separated list of principals allowed to write to this wiki
|
|
* ''csrf-disable'' - set to "yes" to disable CSRF checks (defaults to "no")
|
|
* ''sse-enabled'' - set to "yes" to enable Server-sent events (defaults to "no")
|
|
* ''root-tiddler'' - the tiddler to serve at the root (defaults to "$:/core/save/all")
|
|
* ''root-render-type'' - the content type to which the root tiddler should be rendered (defaults to "text/plain")
|
|
* ''root-serve-type'' - the content type with which the root tiddler should be served (defaults to "text/html")
|
|
* ''tls-cert'' - pathname of TLS certificate file (relative to wiki folder)
|
|
* ''tls-key'' - pathname of TLS key file (relative to wiki folder)
|
|
* ''debug-level'' - optional debug level; set to "debug" to view request details (defaults to "none")
|
|
* ''gzip'' - set to "yes" to enable gzip compression for some http endpoints (defaults to "no")
|
|
|
|
For information on opening up your instance to the entire local network, and possible security concerns, see the WebServer tiddler at TiddlyWiki.com.
|
|
|