mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-01 15:46:18 +00:00
28 lines
553 B
JavaScript
28 lines
553 B
JavaScript
/*\
|
|
title: $:/core/modules/server/routes/get-index.js
|
|
type: application/javascript
|
|
module-type: route
|
|
|
|
GET /
|
|
|
|
\*/
|
|
(function() {
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
exports.method = "GET";
|
|
|
|
exports.path = /^\/$/;
|
|
|
|
exports.handler = function(request,response,state) {
|
|
var text = state.wiki.renderTiddler(state.server.get("root-render-type"),state.server.get("root-tiddler")),
|
|
responseHeaders = {
|
|
"Content-Type": state.server.get("root-serve-type")
|
|
};
|
|
state.sendResponse(200,responseHeaders,text);
|
|
};
|
|
|
|
}());
|