I have been delving into some Javascript web development with Deno, and am trying to get it to work with Jupyter notebooks on Windows 10. I am overall familiar with the basics of Html, CSS, and Javascript, but can't seem to be able to create a basic HTTP page.
The first time I run the below snippet, the server does not open in a new tab in http://localhost:80001/ (it keeps loading), and on the second run the same code (rerunning the same cell), the server loads the right code in the new tab but with errors and gives the output below.
I feel I am missing something basic, would anyone have any insight what it is?
\\ Basic server I am trying to run.
function handler(_req: Request): Response {
return new Response("Hello, World!");
}
\\ Output after I run the above code twice.
Stack trace:
AddrInUse: Only one usage of each socket address (protocol/network address/port) is normally permitted. (os error 10048)
at listen (ext:deno_net/01_net.js:520:35)
at Object.serve (ext:deno_http/00_serve.js:592:16)
at <anonymous>:4:6
Deno.serve({ port: 80001 }, handler);