如果你在运行deno的时候出现了类似下面的错误,不要慌,只是参数顺序错了,把deno run welcome.ts --allow-net改为deno run --allow-net welcome.ts就可以了。

Compile file:///Users/admin/Documents/study/deno-test/welcome.ts
error: Uncaught PermissionDenied: network access to "0.0.0.0:8080", run again with the --allow-net flag
    at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11)
    at Object.sendSync ($deno$/ops/dispatch_json.ts:72:10)
    at Object.listen ($deno$/ops/net.ts:51:10)
    at listen ($deno$/net.ts:152:22)
    at serve (https://deno.land/std@0.50.0/http/server.ts:261:20)
    at file:///Users/admin/Documents/study/deno-test/welcome.ts:2:11