mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-30 23:23:02 +00:00 
			
		
		
		
	 a346888213
			
		
	
	a346888213
	
	
	
		
			
			Tools for working with Amazon Web Services: * Templates for saving a TiddlyWiki as a single JavaScript file in a ZIP file that can be executed as an AWS Lambda function. In this form, TiddlyWiki is a self contained single file containing both code and data, just like the standalone HTML file configuration * Commands that can be used to interact with AWS services, under both the Node.js and Lambda configurations of TiddlyWiki
		
			
				
	
	
		
			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");
 | |
| 	});
 | |
| }
 |