mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-07-02 02:03:14 +00:00
27 lines
668 B
Plaintext
27 lines
668 B
Plaintext
![]() |
title: $:/plugins/tiddlywiki/aws/lambda/handler
|
||
|
type: text/plain
|
||
|
|
||
|
/*
|
||
|
TiddlyWiki for AWS
|
||
|
*/
|
||
|
|
||
|
exports.handler = function(event,context,callback) {
|
||
|
// Initialise the boot prefix
|
||
|
global.$tw = _bootprefix();
|
||
|
// Some default package info
|
||
|
$tw.packageInfo = lambdaPackageInfo;
|
||
|
// Load any tiddlers from the package
|
||
|
$tw.preloadTiddlerArray(lambdaTiddlers);
|
||
|
// Load any tiddlers from the event
|
||
|
if(event.tiddlers) {
|
||
|
$tw.preloadTiddlerArray(event.tiddlers);
|
||
|
}
|
||
|
// Load the commands from the event
|
||
|
$tw.boot.argv = (event.commands || []).slice(0);
|
||
|
// Boot the TW5 app
|
||
|
_boot($tw);
|
||
|
$tw.boot.boot(function() {
|
||
|
callback(null,"TiddlyWiki execution successful");
|
||
|
});
|
||
|
}
|