Serving the Frontend
Explore how to serve an HTML frontend using Deno's HTTP server and filesystem modules. Understand routing setup, setting content types, using import.meta URL handling, and securely enabling read access with the --allow-read flag. This lesson demonstrates serving static files from Deno's runtime to display dynamic content securely.
We'll cover the following...
Because most of the APIs, like the one we wrote previously, are made to be consumed by a front-end application, we’ll do that to wrap up this chapter.
Serving a frontend
Since it’s out of the scope of this course, we won’t write the front-end code that interacts with this API. However, if it’s required to use it with a single-page application that fetches the post-its and displays them, please check index.html
What we’ll learn here is how can we use the web server we just ...