# RESTful Node.js: A Structured Approach

## RESTful Node.js: A Structured Approach

- [Book Cover](https://book.restfulnode.com/readme.md)
- [About the Author](https://book.restfulnode.com/about-the-author.md)
- [Links and Resources](https://book.restfulnode.com/links-and-resources.md)
- [Foreword](https://book.restfulnode.com/part-1/foreword.md)
- [Preface](https://book.restfulnode.com/part-1/preface.md)
- [Chapter 1: Introduction](https://book.restfulnode.com/part-1/chapter-1.md)
- [The Rise of REST and Distributed Systems](https://book.restfulnode.com/part-1/chapter-1/1-the-rise-of-rest-and-distributed-systems.md)
- [Problem #1: Structureless Design, Structureless REST](https://book.restfulnode.com/part-1/chapter-1/2-problem-1-structureless-design-structureless-rest.md)
- [The Emergence of JavaScript and Node.js](https://book.restfulnode.com/part-1/chapter-1/3-the-emergence-of-javascript-and-nodejs.md)
- [Problem #2: Structureless JavaScript, Structureless Node.js](https://book.restfulnode.com/part-1/chapter-1/4-problem-2-structureless-javascript-structureless-nodejs.md)
- [Behold, the Solution: A Structured Approach](https://book.restfulnode.com/part-1/chapter-1/5-behold-the-solution-a-structured-approach.md)
- [Summary](https://book.restfulnode.com/part-1/chapter-1/summary.md)
- [Chapter 2: REST Origins](https://book.restfulnode.com/part-2/chapter-2.md)
- [A Brief History of the Web and the Birth of REST](https://book.restfulnode.com/part-2/chapter-2/1-a-brief-history-of-the-web-and-the-birth-of-rest.md)
- [REST vs. HTTP](https://book.restfulnode.com/part-2/chapter-2/2-rest-vs-http.md)
- [REST - The Abstract Web Architecture](https://book.restfulnode.com/part-2/chapter-2/3-rest-the-abstract-web-architecture.md)
- [HTTP - A Peak at REST's Concrete Implementation](https://book.restfulnode.com/part-2/chapter-2/4-http-a-peak-at-rests-concrete-implementation.md)
- [What does it mean for an API to be RESTful?](https://book.restfulnode.com/part-2/chapter-2/5-what-does-it-mean-for-an-api-to-be-restful.md)
- [Measuring "RESTfulness" with Richardson Maturity Model](https://book.restfulnode.com/part-2/chapter-2/6-measuring-restfulness-with-richardson-maturity-model.md)
- [Pragmatic REST vs Dogmatic REST](https://book.restfulnode.com/part-2/chapter-2/7-pragmatic-rest-vs-dogmatic-rest.md)
- [Summary](https://book.restfulnode.com/part-2/chapter-2/summary.md)
- [Chapter 3: RESTful API Design Guidelines and "Best Practices"](https://book.restfulnode.com/part-2/chapter-3.md)
- [Theories vs. Principles vs. Guidelines](https://book.restfulnode.com/part-2/chapter-3/1-theories-vs-principles-vs-guidelines.md)
- [URI Design](https://book.restfulnode.com/part-2/chapter-3/2-uri-design.md)
- [Method Verbs](https://book.restfulnode.com/part-2/chapter-3/3-method-verbs.md)
- [Status Codes](https://book.restfulnode.com/part-2/chapter-3/4-status-codes.md)
- [Representational Design](https://book.restfulnode.com/part-2/chapter-3/5-representational-design.md)
- [Metadata Design](https://book.restfulnode.com/part-2/chapter-3/6-metadata-design.md)
- [Versioning Strategies](https://book.restfulnode.com/part-2/chapter-3/7-versioning-strategies.md)
- [Security Considerations](https://book.restfulnode.com/part-2/chapter-3/8-security-considerations.md)
- [Documentation](https://book.restfulnode.com/part-2/chapter-3/9-documentation.md)
- [Case Study: GitHub](https://book.restfulnode.com/part-2/chapter-3/10-case-study-github.md)
- [Summary](https://book.restfulnode.com/part-2/chapter-3/summary.md)
- [Chapter 4: Structured JavaScript Architecture](https://book.restfulnode.com/part-2/chapter-4.md)
- [The Monstrous Monolith and Its Downfall](https://book.restfulnode.com/part-2/chapter-4/1-the-monstrous-monolith-and-its-downfall.md)
- [Layered/N-Tier Architecture: The Unpopular Proven Way](https://book.restfulnode.com/part-2/chapter-4/2-layered-n-tier-architecture-the-unpopular-proven-way.md)
- [Microservices and Distributed Computing: A Popular Misdirection](https://book.restfulnode.com/part-2/chapter-4/3-microservices-and-distributed-computing-a-popular-misdirection.md)
- [Summary](https://book.restfulnode.com/part-2/chapter-4/summary.md)
- [Chapter 5: The 8 Step Recipe](https://book.restfulnode.com/part-2/chapter-5.md)
- [Route Name (URI)](https://book.restfulnode.com/part-2/chapter-5/1-route-name-uri.md)
- [Input Request](https://book.restfulnode.com/part-2/chapter-5/2-input-request.md)
- [Middleware](https://book.restfulnode.com/part-2/chapter-5/3-middleware.md)
- [Validation](https://book.restfulnode.com/part-2/chapter-5/4-validation.md)
- [Domain](https://book.restfulnode.com/part-2/chapter-5/5-domain.md)
- [Events](https://book.restfulnode.com/part-2/chapter-5/6-events.md)
- [Output Response](https://book.restfulnode.com/part-2/chapter-5/7-output-response.md)
- [Test, Refactor, Document](https://book.restfulnode.com/part-2/chapter-5/8-test-refactor-document.md)
- [Summary](https://book.restfulnode.com/part-2/chapter-5/summary.md)
- [Chapter 6: Introduction to the Bookstore API](https://book.restfulnode.com/part-3/chapter-6.md)
- [The Bookstore API Endpoint Specifications](https://book.restfulnode.com/part-3/chapter-6/1-the-bookstore-api-endpoint-specifications.md)
- [API Design and Code Structure](https://book.restfulnode.com/part-3/chapter-6/2-api-design-and-code-structure.md)
- [Project Setup](https://book.restfulnode.com/part-3/chapter-6/3-project-setup.md)
- [Summary](https://book.restfulnode.com/part-3/chapter-6/summary.md)
- [Chapter 7: Retrieving Books from our API](https://book.restfulnode.com/part-3/chapter-7.md)
- [Retrieving All Books - Planning](https://book.restfulnode.com/part-3/chapter-7/1-retrieving-all-books-planning.md)
- [Retrieving All Books - Implementation](https://book.restfulnode.com/part-3/chapter-7/2-retrieving-all-books-implementation.md)
- [Retrieving A Book By ID - Planning](https://book.restfulnode.com/part-3/chapter-7/3-retrieving-a-book-by-id-planning.md)
- [Retrieving A Book By ID - Implementation](https://book.restfulnode.com/part-3/chapter-7/4-retrieving-a-book-by-id-implementation.md)
- [Summary](https://book.restfulnode.com/part-3/chapter-7/summary.md)
- [Chapter 8: Adding Authentication to our API](https://book.restfulnode.com/part-3/chapter-8.md)
- [Registering the User - Planning](https://book.restfulnode.com/part-3/chapter-8/1-registering-the-user-planning.md)
- [Registering the User - Implementation](https://book.restfulnode.com/part-3/chapter-8/2-registering-the-user-implementation.md)
- [Logging the User In - Planning](https://book.restfulnode.com/part-3/chapter-8/3-logging-the-user-in-planning.md)
- [Logging the User In - Implementation](https://book.restfulnode.com/part-3/chapter-8/4-logging-the-user-in-implementation.md)
- [Getting Authenticated User - Planning](https://book.restfulnode.com/part-3/chapter-8/5-getting-authenticated-user-planning.md)
- [Getting Authenticated User - Implementation](https://book.restfulnode.com/part-3/chapter-8/6-getting-authenticated-user-implementation.md)
- [Summary](https://book.restfulnode.com/part-3/chapter-8/summary.md)
- [Chapter 9: Adding the Create, Update, and Delete Operations to our API](https://book.restfulnode.com/part-3/chapter-9.md)
- [Creating A Book Listing - Planning](https://book.restfulnode.com/part-3/chapter-9/1-creating-a-book-listing-planning.md)
- [Creating A Book Listing - Implementation](https://book.restfulnode.com/part-3/chapter-9/2-creating-a-book-listing-implementation.md)
- [Updating A Book Listing By ID - Planning](https://book.restfulnode.com/part-3/chapter-9/3-updating-a-book-listing-by-id-planning.md)
- [Updating A Book Listing By ID - Implementation](https://book.restfulnode.com/part-3/chapter-9/4-updating-a-book-listing-by-id-implementation.md)
- [Deleting A Book Listing By ID - Planning](https://book.restfulnode.com/part-3/chapter-9/5-deleting-a-book-listing-by-id-planning.md)
- [Deleting A Book Listing By ID - Implementation](https://book.restfulnode.com/part-3/chapter-9/6-deleting-a-book-listing-by-id-implementation.md)
- [Summary](https://book.restfulnode.com/part-3/chapter-9/summary.md)
- [Chapter 10: Testing our API](https://book.restfulnode.com/part-3/chapter-10.md)
- [Testing the Request](https://book.restfulnode.com/part-3/chapter-10/1-testing-the-request.md)
- [Testing the Middleware](https://book.restfulnode.com/part-3/chapter-10/2-testing-the-middleware.md)
- [Testing the Validation](https://book.restfulnode.com/part-3/chapter-10/3-testing-the-valdiation.md)
- [Testing the Domain](https://book.restfulnode.com/part-3/chapter-10/4-testing-the-domain.md)
- [Testing the Event](https://book.restfulnode.com/part-3/chapter-10/5-testing-the-event.md)
- [Testing the Response](https://book.restfulnode.com/part-3/chapter-10/6-testing-the-response.md)
- [Testing the Controller](https://book.restfulnode.com/part-3/chapter-10/7-testing-the-controller.md)
- [Integration Test](https://book.restfulnode.com/part-3/chapter-10/8-integration-test.md)
- [Summary](https://book.restfulnode.com/part-3/chapter-10/summary.md)
- [Final Words](https://book.restfulnode.com/final-words/final-words.md)
- [Refactoring to HATEOAS](https://book.restfulnode.com/bonus/refactoring-to-hateoas.md)
- [Sources & References](https://book.restfulnode.com/appendix/references.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information, you can query the documentation dynamically by asking a question.
Perform an HTTP GET request on a page URL with the `ask` query parameter:
```
GET https://book.restfulnode.com/readme.md?ask=<question>
```
The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.
Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
