mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-29 23:36:42 +00:00
Add first release of AWS plugin
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
This commit is contained in:
40
plugins/tiddlywiki/aws/docs/lambda.tid
Normal file
40
plugins/tiddlywiki/aws/docs/lambda.tid
Normal file
@@ -0,0 +1,40 @@
|
||||
title: $:/plugins/tiddlywiki/aws/lambda
|
||||
|
||||
! Template
|
||||
|
||||
The template [[$:/plugins/tiddlywiki/aws/lambdas/main]] transcludes everything required to render a TiddlyWiki as an AWS Lambda function.
|
||||
|
||||
The Lambda is build with this command:
|
||||
|
||||
```
|
||||
tiddlywiki editions/aws --rendertiddler $:/plugins/tiddlywiki/aws/lambdas/main index.js text/plain
|
||||
```
|
||||
|
||||
Or:
|
||||
|
||||
```
|
||||
tiddlywiki editions/aws --build lambda
|
||||
```
|
||||
|
||||
! Execution
|
||||
|
||||
The Lambda boot code looks for an array of tiddlers to load in `event.tiddlers`, and an array of commands to execute in `event.commands`. For example:
|
||||
|
||||
```
|
||||
{
|
||||
"commands": [
|
||||
"--aws","s3-rendertiddler","HelloThere","eu-west-2","my-bucket-name","rendered.html"
|
||||
],
|
||||
"tiddlers": [
|
||||
{
|
||||
"title": "HelloThere",
|
||||
"text": "Hello from {{Platform}}."
|
||||
},
|
||||
{
|
||||
"title": "Platform",
|
||||
"text": "TiddlyWiki"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user