mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-30 13:58:06 +00:00
Rename "serverroute" module type to "route"
This commit is contained in:
@@ -12,8 +12,8 @@ isfilteroperator: Operands for the ''is'' filter operator.
|
|||||||
library: Generic module type for general purpose JavaScript modules.
|
library: Generic module type for general purpose JavaScript modules.
|
||||||
macro: JavaScript macro definitions.
|
macro: JavaScript macro definitions.
|
||||||
parser: Parsers for different content types.
|
parser: Parsers for different content types.
|
||||||
|
route: Defines how individual URL patterns are handled by the built-in HTTP server.
|
||||||
saver: Savers handle different methods for saving files from the browser.
|
saver: Savers handle different methods for saving files from the browser.
|
||||||
serverroute: Server routes handle different HTTP requests when using the `--server` command.
|
|
||||||
startup: Startup functions.
|
startup: Startup functions.
|
||||||
storyview: Story views customise the animation and behaviour of list widgets.
|
storyview: Story views customise the animation and behaviour of list widgets.
|
||||||
texteditoroperation: A text editor toolbar operation.
|
texteditoroperation: A text editor toolbar operation.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*\
|
/*\
|
||||||
title: $:/core/modules/server/routes/delete-tiddler.js
|
title: $:/core/modules/server/routes/delete-tiddler.js
|
||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: serverroute
|
module-type: route
|
||||||
|
|
||||||
DELETE /recipes/default/tiddlers/:title
|
DELETE /recipes/default/tiddlers/:title
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*\
|
/*\
|
||||||
title: $:/core/modules/server/routes/get-favicon.js
|
title: $:/core/modules/server/routes/get-favicon.js
|
||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: serverroute
|
module-type: route
|
||||||
|
|
||||||
GET /favicon.ico
|
GET /favicon.ico
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*\
|
/*\
|
||||||
title: $:/core/modules/server/routes/get-file.js
|
title: $:/core/modules/server/routes/get-file.js
|
||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: serverroute
|
module-type: route
|
||||||
|
|
||||||
GET /files/:filepath
|
GET /files/:filepath
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*\
|
/*\
|
||||||
title: $:/core/modules/server/routes/get-index.js
|
title: $:/core/modules/server/routes/get-index.js
|
||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: serverroute
|
module-type: route
|
||||||
|
|
||||||
GET /
|
GET /
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*\
|
/*\
|
||||||
title: $:/core/modules/server/routes/get-status.js
|
title: $:/core/modules/server/routes/get-status.js
|
||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: serverroute
|
module-type: route
|
||||||
|
|
||||||
GET /status
|
GET /status
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*\
|
/*\
|
||||||
title: $:/core/modules/server/routes/get-tiddler.js
|
title: $:/core/modules/server/routes/get-tiddler.js
|
||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: serverroute
|
module-type: route
|
||||||
|
|
||||||
GET /recipes/default/tiddlers/:title
|
GET /recipes/default/tiddlers/:title
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*\
|
/*\
|
||||||
title: $:/core/modules/server/routes/get-tiddlers-json.js
|
title: $:/core/modules/server/routes/get-tiddlers-json.js
|
||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: serverroute
|
module-type: route
|
||||||
|
|
||||||
GET /recipes/default/tiddlers/tiddlers.json
|
GET /recipes/default/tiddlers/tiddlers.json
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*\
|
/*\
|
||||||
title: $:/core/modules/server/routes/put-tiddler.js
|
title: $:/core/modules/server/routes/put-tiddler.js
|
||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: serverroute
|
module-type: route
|
||||||
|
|
||||||
PUT /recipes/default/tiddlers/:title
|
PUT /recipes/default/tiddlers/:title
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ function Server(options) {
|
|||||||
this.wiki = options.wiki;
|
this.wiki = options.wiki;
|
||||||
this.variables = $tw.utils.extend({},this.defaultVariables,options.variables);
|
this.variables = $tw.utils.extend({},this.defaultVariables,options.variables);
|
||||||
// Add route handlers
|
// Add route handlers
|
||||||
$tw.modules.forEachModuleOfType("serverroute", function(title,routeDefinition) {
|
$tw.modules.forEachModuleOfType("route", function(title,routeDefinition) {
|
||||||
// console.log("Loading server route " + title);
|
// console.log("Loading server route " + title);
|
||||||
self.addRoute(routeDefinition);
|
self.addRoute(routeDefinition);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user