This repo follows the RESTful JSON API tutorial here.
Rails is popularly known for building web applications. Chances are if you’re reading this you’ve built a traditional server-rendered web application with Rails before. If not, I’d highly recommend going through the Getting Started with Rails page to familiarize yourself with the Rails framework before proceeding with this tutorial.
As of version 5, Rails core now supports API-only applications! In previous versions, we relied on an external gem: rails-api which has since been merged to core rails.
API-only applications are slimmed down compared to traditional Rails web applications. According to Rails 5 release notes, generating an API only application will:
Start the application with a limited set of middleware Make the ApplicationController inherit from ActionController::API instead of ActionController::Base Skip generation of view files This works to generate an API-centric framework excluding functionality that would otherwise be unused and unnecessary.
In this three-part tutorial, we’ll build a todo list API where users can manage their to-do lists and todo items.