From f283893064142410922545ab421d244c16ec7835 Mon Sep 17 00:00:00 2001 From: Travis Shears Date: Tue, 25 Jun 2024 10:35:50 +0200 Subject: [PATCH] overhaul readme to match the project --- README.md | 62 ++++++++++++++++++++----------------------------------- 1 file changed, 22 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 4858d11..cb1ec3c 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,38 @@ - +# Micro Blog Repo Fetchers -# Serverless Framework Node Scheduled Cron on AWS +The Micro Blog Repo is made up of a PocketBase db and these lambda functions. Together they aggregate, backup, and make my various social media posts available to my personal site. -This template demonstrates how to develop and deploy a simple cron-like service running on AWS Lambda using the Serverless Framework. +## Progress -This examples defines a single function, `rateHandler` which is triggered by an event of `schedule` type at a rate of 1 per minute. For detailed information about `schedule` event, please refer to corresponding section of Serverless [docs](https://serverless.com/framework/docs/providers/aws/events/schedule/). +- [X] [BlueSky](https://bsky.app/profile/travisshears.bsky.social) +- [ ] Old Pleroma formally social.travisshears.xyz + - [ ] Video support + - [X] Post support + - [X] Post with image support +- [X] [Pixelfed via gram.social](https://gram.social/i/web/profile/703621281309160235) +- [ ] [Mastodon via dice.camp](https://dice.camp/@travisshears) +- [ ] [Nostr profile1qqs9....](https://snort.social/nprofile1qqs9udcv9uhqggjz87js9rtaph4lajlxnxsvwvm7zwdjt6etzyk52rgpypmhxue69uhkummnw3ezuetfde6kuer6wasku7nfvuh8xurpvdjj7qgkwaehxw309ajkgetw9ehx7um5wghxcctwvshszrnhwden5te0dehhxtnvdakz7z94haj) -## Usage -### Deployment +## Deployment -In order to deploy the example, you need to run the following command: +To deploy all the lambda functions to AWS: -``` -serverless deploy +```shell +$ yarn deploy ``` -After running deploy, you should see output similar to: - -``` -Deploying "aws-node-scheduled-cron" to stage "dev" (us-east-1) - -✔ Service deployed to stack aws-node-scheduled-cron-dev (151s) - -functions: - rateHandler: aws-node-scheduled-cron-dev-rateHandler (2.3 kB) +After the deploy to manually trigger a fn run: +```shell +$ yarn exec serverless invoke --function bluesky ``` -There is no additional step required. Your defined schedules becomes active right away after deployment. +## Local development -### Local development -The easiest way to develop and test your function is to use the `dev` command: - -``` -serverless dev +```shell +$ yarn exec serverless invoke local --function bluesky ``` -This will start a local emulator of AWS Lambda and tunnel your requests to and from AWS Lambda, allowing you to interact with your function as if it were running in the cloud. - -Now you can invoke the function as before, but this time the function will be executed locally. Now you can develop your function locally, invoke it, and see the results immediately without having to re-deploy. - -When you are done developing, don't forget to run `serverless deploy` to deploy the function to the cloud. +There is also the new `serverless dev` command. I still need to check that out.