https://github.com/philnash/dad-jokes-jets
Get dad jokes by SMS using Ruby, the Jets framework and AWS Lambda
https://github.com/philnash/dad-jokes-jets
aws-lambda jets lambda ruby sms twilio twilio-sms
Last synced: about 1 year ago
JSON representation
Get dad jokes by SMS using Ruby, the Jets framework and AWS Lambda
- Host: GitHub
- URL: https://github.com/philnash/dad-jokes-jets
- Owner: philnash
- Created: 2019-05-03T07:10:22.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-12T05:56:05.000Z (about 3 years ago)
- Last Synced: 2025-04-06T08:32:24.193Z (over 1 year ago)
- Topics: aws-lambda, jets, lambda, ruby, sms, twilio, twilio-sms
- Language: HTML
- Size: 84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dad jokes over SMS using Ruby, Jets and AWS Lambda
This example application combines the [icanhazdadjoke API](https://icanhazdadjoke.com/api) and [Twilio SMS](https://www.twilio.com/sms/api) using the [Jets framework](http://rubyonjets.com/) and [AWS Lambda](https://aws.amazon.com/lambda/).
You can read about how it was built in the blog post [Serverless Ruby on AWS Lambda with the Jets framework](https://www.twilio.com/blog/serverless-ruby-on-aws-lambda-with-the-jets-framework)
## Running the application locally
To run the application locally, follow these steps:
1. Clone the repo and change into the directory
```bash
git clone https://github.com/philnash/dad-jokes-jets.git
cd dad-jokes-jets
```
2. Install the dependencies with bundler
```bash
bundle install
```
3. Run the application with jets
```bash
bundle exec jets serve
```
You can then make `POST` requests to the `/messages` endpoint. For example:
```bash
curl --data "" http://localhost:8888/messages
What’s the advantage of living in Switzerland? Well, the flag is a big plus.
```
Check out the [Jets documentation for more details on building with Jets](http://rubyonjets.com/docs/).