Skip to content

Simple example projects that show how to use ClaudiaJs

Notifications You must be signed in to change notification settings

gcarreto/example-projects

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claudia.js Example projects

Hello world

  • Hello World – shows a trivial Node.js Lambda function and how to set up deployment using Claudia.js
  • 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 – a slightly more complex function, shows how to deploy third party dependencies using Claudia.js
  • Using Babel – shows how to deploy transpiled Babel code
  • Environment Variables – setting and using Lambda environment variables
  • Detecting Context – detect if a function was called for development or production, in order to load the right configuration
  • Recursive invocation – an example of how Lambda can asynchronously call itself to work around timing limitations

Web API

  • Web Serving HTML – shows how to change error and success content types and response codes, and how to perform browser redirects
  • Generic handlers – shows how to capture dynamic paths and set up handlers for any content type easily
  • Custom response codes – shows how to change status codes for response
  • Custom Headers – shows how to return custom headers from API responses
  • Custom CORS origins – shows how to control allowed CORS origins/headers
  • Intercepting requests – an example showing how to prevent or modify requests
  • Post-deploy variable configuration – shows how to set up post-deploy hooks to prompt users for stage variables
  • Generic post-deploy steps – shows how to set up post-deploy hooks for automatic configuration
  • Using Lambda Context – shows how to access the Lambda Context object from projects built using claudia-api-builder
  • DynamoDB CRUD – 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 CRUD operations, using DynamoDB for persistence.
  • GitHub Repository 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 – log events into AWS Mobile Analytics for easy internal telemetry
  • Custom Authorizers – a simple example of how to set up custom authorizers in API Gateway
  • Geo location – shows how to retrieve the country where your users originated the request
  • Binary Content – shows how to configure API Gateway to send or receive binary data
  • Twilio & Shippo webhook – shows how to create an API endpoint for processing webhook updates using Twilio and Shippo

Event 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 – an example how to trigger a function when a message is posted to an IOT Data Topic
  • Pandoc S3 Converter – a more complex example that converts S3 files to .docx using Pandoc
  • SVG to PDF S3 Converter – convert SVG files uploaded to S3 to PDF format using RSVG and Cairo
  • 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

Chat-bots

  • Simple Bot – an example demonstrating how to receive and respond with simple text messages
  • Facebook Messenger Bot with Buttons – an example showing how to create more complex platform specific messages, for example Facebook buttons
  • 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 – an example showing how to send delayed and multiple replies for Slack slash commands.
  • Alexa Skill – an Amazon Echo (Alexa) skill sample that spells out English words

Examples in other repositories

More information

For more information on the Web API configuration syntax, check out the Claudia API Builder project. For more information on Claudia.js options, see the Command Line Usage.

Join the chat at https://gitter.im/claudiajs/claudia

Prerequisites

AWS Lambda currently runs Node.js version 4.3.2 (optionally, you can downgrade to 0.10.36 by using --runtime when creating the function). It's best to use that version for testing. To get started, make sure your credentials are configured. See the ClaudiaJS Getting Started Guide for more information.

About

Simple example projects that show how to use ClaudiaJs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 94.8%
  • Shell 4.3%
  • HTML 0.9%