Check out example codes for "deno allow net". It will help you in understanding the concepts better.

Code Example 1

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

Learn ReactJs, React Native from akashmittal.com