deno allow net 1

deno allow net

// --allow-net permission is mandatory in deno
// to allow network access
deno run --allow-net script.ts

Here is what the above code is Doing:
1. We are importing the deno standard library module called “http”
2. We are creating a server using the “createServer” function
3. We are listening to the server on port 8000
4. We are sending a response to the client

Similar Posts