Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/claudiajs/example-projects
Simple example projects that show how to use ClaudiaJs
https://github.com/claudiajs/example-projects
Last synced: 15 days ago
JSON representation
Simple example projects that show how to use ClaudiaJs
- Host: GitHub
- URL: https://github.com/claudiajs/example-projects
- Owner: claudiajs
- Created: 2016-02-13T11:53:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-03-11T22:40:07.000Z (over 3 years ago)
- Last Synced: 2024-07-31T19:41:40.912Z (3 months ago)
- Language: JavaScript
- Size: 4.26 MB
- Stars: 649
- Watchers: 45
- Forks: 235
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Claudia.js Example projects
## Hello world
* [Hello World](hello-world) – shows a trivial Node.js Lambda function and how to set up deployment using Claudia.js
* [Web API](web-api) – a simple REST api, shows how to configure and deploy an API Gateway interface along with the Lambda function## Common Development tasks
* [Using NPM Modules](using-npm-modules) – a slightly more complex function, shows how to deploy third party dependencies using Claudia.js
* [Using Babel](babel) – shows how to deploy transpiled Babel code
* [Environment Variables](env-variables) – setting and using Lambda environment variables
* [Detecting Context](detecting-context) – detect if a function was called for development or production, in order to load the right configuration
* [Recursive invocation](recursive-invoke) – an example of how Lambda can asynchronously call itself to work around timing limitations
* [Packing for AWS SAM](sam-packaging) – an example of how to use Claudia to prepare packages for deployment using CloudFormation and AWS SAM## Web API
* [Web Serving HTML](web-serving-html) – shows how to change error and success content types and response codes, and how to perform browser redirects
* [Generic handlers](web-api-generic-handlers) – shows how to capture dynamic paths and set up handlers for any content type easily
* [Custom response codes](web-api-custom-status-code) – shows how to change status codes for response
* [Custom Headers](web-api-custom-headers) – shows how to return custom headers from API responses
* [Custom CORS origins](web-api-custom-cors) – shows how to control allowed CORS origins/headers
* [Intercepting requests](intercepting-requests) – an example showing how to prevent or modify requests
* [Post-deploy variable configuration](web-api-postdeploy-configuration) – shows how to set up post-deploy hooks to prompt users for stage variables
* [Generic post-deploy steps](web-api-postdeploy) – shows how to set up post-deploy hooks for automatic configuration
* [Using Lambda Context](web-api-lambda-context) – shows how to access the Lambda Context object from projects built using `claudia-api-builder`
* [DynamoDB CRUD](dynamodb-example) – a simple document store, shows how to use DynamoDB and connect it to a CRUD REST API. Also shows how to configure a single Lambda function to work with different resources for development, testing and production.
* [GraphQL Endpoint](graphql-example) – GraphQL CRUD operations, using DynamoDB for persistence.
* [GitHub Repository Labels](github-repo-labels) – a simple image server, shows how to map URL path components to arguments, how to customise response types and how to connect to third party REST APIs
* [Using AWS Mobile Analytics for server-side events](aws-mobile-analytics) – log events into AWS Mobile Analytics for easy internal telemetry
* [Custom Authorizers](custom-authorizers) – a simple example of how to set up custom authorizers in API Gateway
* [Geo location](api-gw-geolocation) – shows how to retrieve the country where your users originated the request
* [Binary Content](binary-content) – shows how to configure API Gateway to send or receive binary data
* [Twilio & Shippo webhook](twilio-shippo-webhook) – shows how to create an API endpoint for processing webhook updates using Twilio and Shippo## Event processing
* [S3 File Processing](s3-file-processing) – an example service that converts files uploaded to S3; shows how to wire up Lambda to respond to S3 events
* [IOT Topic Filters](iot-topic-filter) – an example how to trigger a function when a message is posted to an IOT Data Topic
* [Pandoc S3 Converter](pandoc-s3-converter) – a more complex example that converts S3 files to .docx using Pandoc
* [SVG to PDF S3 Converter](svg-to-pdf-s3-converter) – convert SVG files uploaded to S3 to PDF format using RSVG and Cairo
* [Website Email Alert](website-email-alert) – periodically check a URL and send an e-mail if it is not available; shows how to send e-mails using SES and set up Lambda functions as scheduled recurring events## Proxy API
* [Deploying a Proxy API](deploy-proxy-api) – an example of how to create an API Gateway that will proxy all requests directly to a Lambda function
* [Running Express Apps in AWS Lambda](express-app-lambda) – an example of how to deploy an existing Express app with minimal changes to Lambda
* [Running fastify Apps in AWS Lambda](fastify-app-lambda) – an example of how to deploy an existing fastify app with minimal changes to Lambda## Chat-bots
* [Simple Bot](simple-bot) – an example demonstrating how to receive and respond with simple text messages
* [Facebook Messenger Bot with Buttons](bot-with-buttons) – an example showing how to create more complex platform specific messages, for example Facebook buttons
* [Space Explorer Bot](https://github.com/stojanovic/space-explorer-bot) – uses NASA's API to get the data and images about the space, shows how to use Facebook Template builders for response messages.
* [Slack Delayed Reply](slack-delayed-response) – an example showing how to send delayed and multiple replies for Slack slash commands.
* [Alexa Skill](alexa-skill) – an Amazon Echo (Alexa) skill sample that spells out English words## Examples in other repositories
* [Quote Bot](https://github.com/philnash/quote-bot), showing how to integrate with Twilio
* [Slack Ping Command](https://github.com/marcusoftnet/pingu), showing how to create a simple Slack command, pinging a Web URL and reporting the result
* [State-Action-Model](https://github.com/jdubray/sam-samples/tree/master/crud-blog-lambda) example, showing how to use the [SAM pattern](http://sam.js.org/) to create a Lambda-powered blog## More information
For more information on the Web API configuration syntax, check out the [Claudia API Builder](https://github.com/claudiajs/claudia-api-builder/blob/master/README.md) project. For more information on Claudia.js options, see the [Command Line Usage](https://github.com/claudiajs/claudia/tree/master/docs).
[![Join the chat at https://gitter.im/claudiajs/claudia](https://badges.gitter.im/claudiajs/claudia.svg)](https://gitter.im/claudiajs/claudia?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
## Prerequisites
To get started, make sure your credentials are configured. See the [ClaudiaJS Getting Started Guide](https://github.com/claudiajs/claudia/blob/master/getting_started.md) for more information.
AWS Lambda currently runs Node.js version 10 and 8 (you can choose the runtime with `--runtime` when [creating the function](https://github.com/claudiajs/claudia/blob/master/docs/create.md)). It's best to use the same version for testing and deployment.