This example application combines the icanhazdadjoke API and Twilio SMS using the Jets framework and AWS Lambda.
You can read about how it was built in the blog post Serverless Ruby on AWS Lambda with the Jets framework
To run the application locally, follow these steps:
-
Clone the repo and change into the directory
git clone https://github.com/philnash/dad-jokes-jets.git cd dad-jokes-jets
-
Install the dependencies with bundler
bundle install
-
Run the application with jets
bundle exec jets serve
You can then make POST
requests to the /messages
endpoint. For example:
curl --data "" http://localhost:8888/messages
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Message>What’s the advantage of living in Switzerland? Well, the flag is a big plus.</Message>
</Response>
Check out the Jets documentation for more details on building with Jets.