Starting Examples
Deno is a runtime for JavaScript/TypeScript which tries to be web compatible and use modern features wherever possible.
Deno also has the ability to execute scripts from the URLs mentioned.
Save the snippet code into a file say first.ts
file
Execute the script using the command
You can see the output in the terminal
For reference i am currently using the same deno environment in docker container..
#Deno_Http_Requests
You can also make HTTP requests
See that the top level await also implemented without using any async keyword.
When you run the above code snippet initially you get this warning message
![[Deno-network-warning.png]] Follow the steps whatever you want to give the script access to net
#Deno_File_Reading
Also #Deno_File_API
Now run the program with the flag --allow-read
Execute the below command to run the script (I saved the file as files.ts
)
The Two commands before the deno command is to make sure that there is something to work like some files that are created on the fly so that we can see the actual output from the deno file execution
#Deno_Http_Server
[[DENO LAND/http_server.ts]]
Last updated