In this video series we will build a Rails API from scratch. Backend APIs are useful for serving data to frontend applications, mobile apps or other backend services.
✨ Check out the new version of this video series, which has been updated for Rails 7 • Rails 7 API Tutorial - Create project...
📖 You can also purchase the eBook and code for the new Rails 7 tutorial - https://tomkadwill.gumroad.com/l/rail...
This video covers:
0:14 - Looking at Stripes API for an example of namespacing and versioning
1:29 - Reasons why namespacing and versioning are important
3:22 - Updating the routing so that API routes are namespaces and versioned. Routes will now be prepended by /api/v1/
4:45 - Create namespaced/versioned controller directory structure
5:06 - Nesting the BooksController class under an Api::V1 module structure
5:49 - Testing everything out with cURL. The route has changed from localhost:3000/books to localhost:3000/api/v1/books
If you’re new to this series, you may want to start with part 1: • Rails 6 API Tutorial - Create project...