1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-01 05:49:55 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/commands/ServerCommand.tid

26 lines
884 B
Plaintext
Raw Normal View History

2012-06-10 16:48:23 +00:00
title: ServerCommand
tags: docs command
The server is very simple. 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`.
2013-01-16 13:44:09 +00:00
```
2012-06-10 16:48:23 +00:00
--server <port> <roottiddler> <rendertype> <servetype>
2013-01-16 13:44:09 +00:00
```
2012-06-10 16:48:23 +00:00
For example:
2013-01-16 13:44:09 +00:00
```
2012-06-10 16:48:23 +00:00
--server 8080 $:/core/tiddlywiki5.template.html text/plain text/html
2013-01-16 13:44:09 +00:00
```
2012-06-10 16:48:23 +00:00
The parameters are:
2013-01-16 13:44:09 +00:00
```
2012-06-10 16:48:23 +00:00
--server <port> <roottiddler> <rendertype> <servetype>
2013-01-16 13:44:09 +00:00
```
2012-06-10 16:48:23 +00:00
* ''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")