1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-28 12:29:56 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/commands/ServerCommand.tid

28 lines
1.4 KiB
Plaintext
Raw Normal View History

2012-06-10 16:48:23 +00:00
title: ServerCommand
tags: command
2012-06-10 16:48:23 +00:00
2013-03-12 19:01:14 +00:00
The server built in to TiddlyWiki5 is very simple. Although compatible with TiddlyWeb it doesn't support many of the features needed for robust Internet-facing usage - in particular, TiddlyWiki5 is an old-school wiki in the sense that it offers no authentication.
At the root, it serves a rendering of a specified tiddler. Away from the root, it serves individual tiddlers encoded in JSON, and supports the basic HTTP operations for `GET`, `PUT` and `DELETE`.
2012-06-10 16:48:23 +00:00
2013-01-16 13:44:09 +00:00
```
--server <port> <roottiddler> <rendertype> <servetype> <username>
2013-01-16 13:44:09 +00:00
```
2012-06-10 16:48:23 +00:00
The parameters are:
* ''port'' - port number to serve from (defaults to "8080")
* ''roottiddler'' - the tiddler to serve at the root (defaults to "$:/core/tiddlywiki5.template.html")
* ''rendertype'' - the content type to which the root tiddler should be rendered (defaults to "text/plain")
* ''servetype'' - the content type with which the root tiddler should be served (defaults to "text/html")
* ''username'' - the default username for signing edits
* ''password'' - optional password for basic authentication
If the password parameter is specified then the browser will prompt the user for the username and password. Note that the password is transmitted in plain text so this implementation isn't suitable for general use.
For example:
```
--server 8080 $:/core/tiddlywiki5.template.html text/plain text/html MyUserName
```