Install Demo
brew install deno
Still Apple Spell checker invites me to change the spelling to demo.
I guess we all have to get used to it.
Trying the script
Installation is easy. Now I try with a simple typescript from deno.land
Trying out the script
import { serve } from "https://deno.land/std@0.50.0/http/server.ts";
const s = serve({ port: 8000 });
console.log("http://localhost:8000/");
for await (const req of s) {
req.respond({ body: "Hello World\n" });
}
deno run denoDemo.ts
That comes up with
error: Uncaught PermissionDenied: network access to "0.0.0.0:8000", run again with the --allow-net flag
oh 👌🏼...
deno run denoDemo.ts --allow-net
still
error: Uncaught PermissionDenied: network access to "0.0.0.0:8000", run again with the --allow-net flag
Now I have to turn myself into Google.com
it is actually and should be
> deno run --allow-net denoDemo.ts
http://localhost:8000/
Ta da well hello, world!
Top comments (1)
Wish I saw this post earlier it would have saved me 10 minutes :)
Thank you