10.9 Summary
In this chapter, you learned how to create a server with a REST interface that is suitable for communicating with other machines as well as with modern single-page applications. The output format here is very often JSON, which is natively supported by Express. The changes to create such a REST interface are mostly limited to the controller layer because it determines the format of the output. Unlike classic multipage applications, REST interfaces don’t use a template engine because the output isn’t in HTML format.
Other requirements are also placed on a REST interface with regard to authentication. Because such an interface should basically be stateless, session-based solutions like the one you learned about in the previous chapter ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access