Make sure to pass the flags to give the necessary permissions to the server:

> ls
templates/ server.ts
> deno run --allow-net --allow-read server.ts
Running server on 0.0.0.0:8080...
200 /
404 /favicon.ico