Simple API Example Jets app. It has a posts_controller.rb demonstrates a RESTful API.
git clone https://github.com/tongueroo/demo-example-api demo
cd demo
# edit config/database.yml with the desired database endpoint
bundle
jets db:create db:migrate
jets server # start server
Now you should be able to go to these urls to see the app.
- http://localhost:3000
- http://localhost:3000/posts # demo CRUD
Next, we'll deploy the app to AWS Lambda with jets deploy.
cd demo
vim .env.development.remote # add your env variables
jets deploy
Here's the blog article and live demo links:
- Blog Post: Build an API with the Jets Ruby Serverless Framework
- Here's the link to the Live API Demo
If you find Jets interesting, please it a GitHub star tongueroo/jets. It helps others find out about the project. I'd appreciate it!