diff options
| author | shu <nvcsadjkojf@outlook.com> | 2026-07-26 18:33:43 +0800 |
|---|---|---|
| committer | shu <nvcsadjkojf@outlook.com> | 2026-07-26 18:33:43 +0800 |
| commit | c1414f940c1fca93df0c266a3e90c9ff1d7e88c7 (patch) | |
| tree | 4d613a365905d12699d71b3bfb2f68d2a7089c1c /tiddlers/files API demo.tid | |
Initial TiddlyWiki setup
Diffstat (limited to 'tiddlers/files API demo.tid')
| -rw-r--r-- | tiddlers/files API demo.tid | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tiddlers/files API demo.tid b/tiddlers/files API demo.tid new file mode 100644 index 0000000..dce6e46 --- /dev/null +++ b/tiddlers/files API demo.tid @@ -0,0 +1,51 @@ +created: 20260726073547121 +modified: 20260726085801292 +tags: tiddlywiki +title: files API demo +type: text/vnd.tiddlywiki + +\procedure store-file-list() +<$action-setfield + $tiddler="$:/temp/files-list" + text=<<data>> + type="application/json" +/> +\end + +<$button> + <$action-sendmessage + $message="tm-http-request" + url="./api/files" + method="GET" + oncompletion=<<store-file-list>> + /> + 刷新文件列表 +</$button> + +<pre><$text text={{$:/temp/files-list}}/></pre> + +[img[./files/photo_2026-07-26_11-10-12.jpg]] + + +```caddyfile +example.com { + encode zstd gzip + + @api path /api/* + reverse_proxy @api localhost:3000 + + header { + X-Content-Type-Options nosniff + } +} +``` + +```json5 +{ + // 支持注释 + unquoted: 'value', + hexadecimal: 0xFF, + infinity: Infinity, + trailingComma: true, +} +```
\ No newline at end of file |
