Running Deno code in the browser
One of the things we mentioned in the previous chapters and one that we've considered as one of Deno's selling points is its full compatibility with ECMAScript6. This makes it possible for Deno code to be compiled and run on the browser. This compilation is something made by Deno itself, and the bundler is included in the toolchain.
This feature enables a whole load of possibilities. A lot of them are due to the capacity for sharing code between the API and the client, and that's what we'll explore in this section.
We'll build a very simple JavaScript client to interact with the Museums API we just built. This client can then be used by any browser application that wants to connect to the API. We'll write that client in Deno and bundle it so that it can be used by a client, or even served by the application itself.
The client we'll write will be a very rudimentary HTTP client, thus we'll not focus much...