Chapter 7: HTTPS, Extracting Configuration, and Deno in the Browser

In the previous chapter, we pretty much wrapped up our application's features. We added authorization and persistence, ending up with an application connected to a MongoDB instance. In this chapter, we'll focus on some known best practices that are standard in production applications: basic security practices and dealing with configuration.

First, we'll add a couple of basic security features to our application programming interface (API), starting with Cross-Origin Resource Sharing (CORS) protection, to enable the filtering of requests based on their origin. Then, we'll learn how to enable HyperText Transfer Protocol Secure (HTTPS) in our application so that it supports encrypted ...

Get Deno Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.