Permalink
Browse files

[doc] update SERVER.md

  • Loading branch information...
1 parent cc74b31 commit e4c85fb9c90a7480003d7c3ce37e2f4a95ef2a48 @jankeromnes jankeromnes committed Dec 13, 2012
Showing with 28 additions and 40 deletions.
  1. +28 −0 SERVER.md
  2. +0 −40 Server.md
View
@@ -0,0 +1,28 @@
+This is documentation for the `app.js` server script. Please edit if you find
+it out-of-date or incomplete.
+
+# Routing requests
+
+* Requested resources are templated into plugs if metadata or type require it:
+ - If resource is a zip file, serve directly (do not template / route).
+ - If resource is a text file, embed its content into a text editor.
+ - If resource is a folder, embed a list of its files into a file explorer.
+ - If resource metadata require a specific plug, use that plug as template.
+
+# Ajax actions
+
+* `profiler` serves profiling information about the server.
+
+* `fs` filesystem primitives:
+ - `create` a new entry (file or folder)
+ - `read` an entry (file or folder)
+ - `apply` an operation (insert or delete content)
+ - `delete` an entry
+
+* `meta-save` mutate metadata of a file system entry
+
+* `upload` import bulk files as new entries
+
+* `join` an IRC channel
+
+* `say` something on an IRC channel
View
@@ -1,40 +0,0 @@
-This is documentation for the `app.js` server file. Please edit if you find it
-out-of-date or incomplete.
-
-# Rerouted paths
-
-* Paths beginning with /root/ are handled like this:
- - If path is a file, use `web/pencil.html` to display text content.
- - If path is a folder, use `web/gateway.html` to list folder content.
-
-# Ajax actions
-
-* `fs` filesystem primitives
- - `query.path` path to access
- - `query.op` operation ( `ls` or `cat` give content )
-
-* `data` open a file for collaboration (we might remove it, using `dispatch`
- instead)
- - `query.path` path of file
- - `query.user` ID timestamp like `+(new Date())`
-
-* `new` commit new changes on a file
- - `query.path` path of file
- - `query.user` ID of author
- - `query.rev` new revision of file
- - `query.delta` changes to file
-
-* `dispatch` subscribe to changes on a file
- - `query.path` path of file
- - `query.user` ID of user
-
-* `kill` close a file
- - `query.path` path of file
- - `query.user` ID of user
-
-* `chat` subscribe to chat messages
-
-* `talk` send messages on chat
- - `query.nick` nickname
- - `query.message` text
-

0 comments on commit e4c85fb

Please sign in to comment.