{"id":7024,"date":"2020-05-15T02:52:09","date_gmt":"2020-05-14T21:52:09","guid":{"rendered":"https:\/\/ahmadawais.com\/?p=7024"},"modified":"2020-06-09T21:24:37","modified_gmt":"2020-06-09T16:24:37","slug":"deno","status":"publish","type":"post","link":"https:\/\/ahmadawais.com\/deno\/","title":{"rendered":"Deno: Learn by Example"},"content":{"rendered":"<\/section>\n<div class=\"postcontents full\">\n<p><a href=\"https:\/\/denobeginner.com\/?utm_source=ahmadawais.com&amp;utm_medium=referral&amp;utm_campaign=Launch%20Post\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7133\" src=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/denobeginner.com_.jpg\" alt=\"Denobeginner.com\" width=\"1920\" height=\"1080\" srcset=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/denobeginner.com_.jpg 1920w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/denobeginner.com_-300x169.jpg 300w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/denobeginner.com_-1024x576.jpg 1024w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/denobeginner.com_-768x432.jpg 768w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/denobeginner.com_-1536x864.jpg 1536w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/denobeginner.com_-1680x945.jpg 1680w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/denobeginner.com_-860x484.jpg 860w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/denobeginner.com_-680x383.jpg 680w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/denobeginner.com_-400x225.jpg 400w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/denobeginner.com_-50x28.jpg 50w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<\/div>\n<section class=\"postcontents wrapper\">\n<p>Deno 1.0 has just been released. It seems to be pretty awesome. Let&#8217;s learn deno and build a couple of example projects.<\/p>\n<div class=\"alert gray\">\n<p style=\"text-align: center;\">\ud83e\udd95 I&#8217;ve released a free video course. <a href=\"https:\/\/denobeginner.com\/?utm_source=ahmadawais.com&amp;utm_medium=referral&amp;utm_campaign=Launch%20Post\"><strong>Learn Deno for Beginners<\/strong><\/a> \u2192<\/p>\n<\/div>\n<h2 id=\"deno\">Deno<a href=\"#deno\" class=\"heading-link\">#<\/a><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-7034 size-medium\" src=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-300x300.png\" alt=\"Deno\" width=\"300\" height=\"300\" srcset=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-300x300.png 300w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno.png 1024w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-150x150.png 150w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-768x768.png 768w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-860x860.png 860w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-680x680.png 680w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-400x400.png 400w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-50x50.png 50w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-60x60.png 60w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><strong>Deno<\/strong> is a secure runtime for JavaScript and TypeScript. Imagine if you could write TypeScript without any config files, and bundle it all together into a single ES Module where both the TypeScript support and bundler are present in the core. That&#8217;s what it feels like when you get started with <strong>Deno<\/strong>.<\/p>\n<p>It&#8217;s a modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. Whereas Node.js is written in C++ and JavaScript.<\/p>\n<p><strong>Fun fact<\/strong>: Deno is an anagram of Node. If you sort() <code>node<\/code> it becomes <code>deno<\/code>.<\/p>\n<pre class=\"lang:javascript\">\"node\".split(\"\").sort().join(\"\"); \/\/ Output: deno<\/pre>\n<p>Deno is also created by the creator of Node. Ryan Dahl. Yet deno is !node and node is !deno. <em>OK, I&#8217;ll stop with the dad jokes now.<\/em><\/p>\n<p>The core has many required features for writing modern JavaScript &amp; TypeScript, and WebAssembly code.<\/p>\n<ul>\n<li>\ud83d\udce6 bundler<\/li>\n<li>\ud83d\udc1b debugger<\/li>\n<li>\ud83e\udd16 test runner<\/li>\n<li>\ud83e\uddf6 code formatter<\/li>\n<li>\ud83d\udcd6 docs generator<\/li>\n<li>\ud83d\uddc3 dependency inspector<\/li>\n<li>\ud83e\uddf5 WebAssembly support<\/li>\n<\/ul>\n<h3 id=\"more-interesting-features-include\">More interesting features include\u2026<a href=\"#more-interesting-features-include\" class=\"heading-link\">#<\/a><\/h3>\n<ul>\n<li><strong>Secure by default.<\/strong><br \/>\nNo file, network, or environment access, unless explicitly enabled.<\/li>\n<li><strong>Single Executable.<br \/>\n<\/strong>Ships only a single executable file.<\/li>\n<\/ul>\n<h2 id=\"install-deno\">Install Deno<a href=\"#install-deno\" class=\"heading-link\">#<\/a><\/h2>\n<p>With Shell:<\/p>\n<pre class=\"lang:bash\">curl -fsSL https:\/\/deno.land\/x\/install\/install.sh | sh<\/pre>\n<p>With Homebrew:<\/p>\n<pre class=\"lang:bash\">brew install deno<\/pre>\n<p>Now check if <code>deno<\/code> was installed by running the <code>deno --version<\/code> command in your terminal.<\/p>\n<\/section>\n<div class=\"postcontents full\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7033\" src=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno.jpg\" alt=\"Deno\" width=\"1170\" height=\"612\" srcset=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno.jpg 1170w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-300x157.jpg 300w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-1024x536.jpg 1024w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-768x402.jpg 768w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-860x450.jpg 860w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-680x356.jpg 680w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-400x209.jpg 400w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-50x26.jpg 50w\" sizes=\"auto, (max-width: 1170px) 100vw, 1170px\" \/><\/p>\n<\/div>\n<section class=\"postcontents wrapper\">\n<h3 id=\"deno-completions\">Deno Completions<a href=\"#deno-completions\" class=\"heading-link\">#<\/a><\/h3>\n<p>You can generate a completions script for your shell using the deno completions command. The command outputs to stdout so you should redirect it to an appropriate file.<\/p>\n<p>The supported shells are:<\/p>\n<ul>\n<li>zsh<\/li>\n<li>bash<\/li>\n<li>fish<\/li>\n<li>elvish<\/li>\n<li>Powershell<\/li>\n<\/ul>\n<pre class=\"lang:bash\">deno completions bash &gt; \/usr\/local\/etc\/bash_completion.d\/deno.bash\r\nsource \/usr\/local\/etc\/bash_completion.d\/deno.bash<\/pre>\n<blockquote><p>See <a href=\"https:\/\/github.com\/denoland\/deno_install\">deno install documentation<\/a> for more installation options.<\/p><\/blockquote>\n<h2 id=\"deno-documentation\">Deno Documentation<a href=\"#deno-documentation\" class=\"heading-link\">#<\/a><\/h2>\n<ul>\n<li>Website: <a href=\"https:\/\/deno.land\/\">deno.land<\/a><\/li>\n<li><a href=\"https:\/\/doc.deno.land\/https\/github.com\/denoland\/deno\/releases\/latest\/download\/lib.deno.d.ts\">Runtime Documentation<\/a><\/li>\n<li><a href=\"https:\/\/deno.land\/std\">Standard Library<\/a><\/li>\n<li><a href=\"https:\/\/deno.land\/x\">Third-Party Modules<\/a><\/li>\n<li><a href=\"https:\/\/deno.land\/manual\">Manual &#8211; General documentation<\/a><\/li>\n<\/ul>\n<\/section>\n<div class=\"postcontents full dark\">\n<div class=\"wrapper\">\n<h2 id=\"deno-code-examples\">Deno Code Examples<a href=\"#deno-code-examples\" class=\"heading-link\">#<\/a><\/h2>\n<\/div>\n<\/div>\n<section class=\"postcontents wrapper\">\n<h3 id=\"example-1-deno-hello-world\">Example #1: Deno Hello World<a href=\"#example-1-deno-hello-world\" class=\"heading-link\">#<\/a><\/h3>\n<p>Run the code:<\/p>\n<pre class=\"lang:bash\">deno run https:\/\/deno.land\/std\/examples\/welcome.ts<\/pre>\n<p>The code for this file is a simple console log.<\/p>\n<pre class=\"lang:javascript\">console.log(\"Hello Deno \ud83e\udd95\");<\/pre>\n<p>The output should look like this:<\/p>\n<\/section>\n<div class=\"postcontents full\">\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7031\" src=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-hello-world.jpg\" alt=\"Deno Hello World\" width=\"1778\" height=\"498\" srcset=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-hello-world.jpg 1778w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-hello-world-300x84.jpg 300w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-hello-world-1024x287.jpg 1024w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-hello-world-768x215.jpg 768w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-hello-world-1536x430.jpg 1536w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-hello-world-1680x471.jpg 1680w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-hello-world-860x241.jpg 860w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-hello-world-680x190.jpg 680w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-hello-world-400x112.jpg 400w, https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-hello-world-50x14.jpg 50w\" sizes=\"auto, (max-width: 1778px) 100vw, 1778px\" \/><\/p>\n<\/div>\n<section class=\"postcontents wrapper\">\n<h3 id=\"example-2-deno-cat-example\">Example #2: Deno <code>cat<\/code> Example<a href=\"#example-2-deno-cat-example\" class=\"heading-link\">#<\/a><\/h3>\n<p>Let&#8217;s implement a Unix <code>cat<\/code> program that outputs the contents of a file. Create a file called <code>cat.ts<\/code> with the following content in it.<\/p>\n<pre class=\"lang:javascript\">\/\/ An implementation of the unix \"cat\" program.\r\nfor (let i = 0; i &lt; Deno.args.length; i++) {\r\n  let filename = Deno.args[i];\r\n  let file = await Deno.open(filename);\r\n  await Deno.copy(file, Deno.stdout);\r\n  file.close();\r\n}<\/pre>\n<ul>\n<li><code>Deno.args<\/code> are the arguments received by this file<\/li>\n<li><code>Deno.open()<\/code> opens a file<\/li>\n<li><code>Deno.copy(file, Deno.stdout)<\/code> copies the file from the source to the destination i.e. the standard output<\/li>\n<\/ul>\n<p>Let&#8217;s run this file with the following command and read the <code>welcome.ts<\/code> that we wrote in the first example.<\/p>\n<pre class=\"lang:bash\">deno run cat.ts welcome.ts<\/pre>\n<\/section>\n<div class=\"postcontents full\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7035\" src=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-permission-error.gif\" alt=\"Deno Permission Error\" width=\"1013\" height=\"570\" \/><\/p>\n<\/div>\n<section class=\"postcontents wrapper\">\n<p>Uh-oh. Remember <code>deno<\/code> is secure by default. That means we need to allow the file read access to be able to run this program.<\/p>\n<p>Let&#8217;s do that by reforming the command and this time with <code>--allow-read<\/code> flag right after the <code>run<\/code> keyword.<\/p>\n<pre class=\"lang:bash\">deno run --allow-read cat.ts welcome.ts<\/pre>\n<\/section>\n<div class=\"postcontents full\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7036\" src=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-cat.gif\" alt=\"Deno Cat\" width=\"1076\" height=\"605\" \/><\/p>\n<\/div>\n<section class=\"postcontents wrapper\">\n<h3 id=\"example-3-deno-server-example\">Example #3: Deno Server Example<a href=\"#example-3-deno-server-example\" class=\"heading-link\">#<\/a><\/h3>\n<p>Let&#8217;s create a <code>deno<\/code> server. The code for which looks pretty simple. Create a file called <code>server.ts<\/code> with the following code.<\/p>\n<pre class=\"lang:javascript\">import { serve } from \"https:\/\/deno.land\/std\/http\/server.ts\";\r\n\r\nconst server = serve({ port: 8000 });\r\n\r\nconsole.log(\"Running at: http:\/\/localhost:8000\/\");\r\n\r\nfor await (const req of server) {\r\n  const body = \"Hello Deno!\";\r\n  req.respond({ body });\r\n}<\/pre>\n<p>You might be thinking, what the heck is that <code>await<\/code> doing there. Well, <code>deno<\/code> implements a <a href=\"https:\/\/v8.dev\/features\/top-level-await\">top-level await<\/a> which is a new feature for ES Modules in the JavaScript V8 Engine. Basically it doesn&#8217;t need an enclosing <code>async<\/code> function to run <code>await<\/code> in the top-level scope.<\/p>\n<p>Now let&#8217;s run the following command<\/p>\n<pre class=\"lang:bash\">deno run server.ts<\/pre>\n<p>Nops. That won&#8217;t work. We haven&#8217;t allowed it permission to access the net. Let&#8217;s allow access with <code>--allow-net<\/code> flag.<\/p>\n<pre class=\"lang:bash\">deno run --allow-net server.ts<\/pre>\n<\/section>\n<div class=\"postcontents full\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7038\" src=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/deno-server.gif\" alt=\"Deno Server\" width=\"1099\" height=\"618\" \/><\/div>\n<section class=\"postcontents wrapper\">\n<p>\u2026and that&#8217;s about it.<\/p>\n<h2 id=\"interested-in-learning-deno\">Interested in Learning Deno?<a href=\"#interested-in-learning-deno\" class=\"heading-link\">#<\/a><\/h2>\n<p>If you would like to learn <code>deno<\/code> a bit deeper then sign up to my <del><a href=\"https:\/\/AhmadAwais.com\/subscribe\">newsletter<\/a> and you&#8217;ll hear from me sooner than later<\/del> free <a href=\"https:\/\/denobeginner.com\/?utm_source=ahmadawais.com&amp;utm_medium=referral&amp;utm_campaign=Launch%20Post\">Deno video course<\/a>. For now, I&#8217;d appreciate it if you share this article on Twitter. And share your thoughts about <code>deno<\/code>.<\/p>\n<p>Peace! \u270c\ufe0f<\/p>\n<div class=\"alert gray\">\n<p style=\"text-align: center;\">\ud83e\udd95 I&#8217;ve released a free video course. <a href=\"https:\/\/denobeginner.com\/?utm_source=ahmadawais.com&amp;utm_medium=referral&amp;utm_campaign=Launch%20Post\"><strong>Learn Deno for Beginners<\/strong><\/a> \u2192<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Deno 1.0 has just been released. It seems to be pretty awesome. Learn deno with Awais and build a couple of example projects.<\/p>\n","protected":false},"author":2,"featured_media":7039,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[181],"tags":[266],"class_list":["post-7024","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-deno"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Deno: Learn by Example<\/title>\n<meta name=\"description\" content=\"Deno 1.0 has just been released. It seems to be pretty awesome. Learn deno with Awais and build a couple of example projects.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ahmadawais.com\/deno\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Deno: Learn by Example\" \/>\n<meta property=\"og:description\" content=\"Deno 1.0 has just been released. It seems to be pretty awesome. Learn deno with Awais and build a couple of example projects.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ahmadawais.com\/deno\/\" \/>\n<meta property=\"og:site_name\" content=\"Ahmad Awais\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/AhmadAwais\" \/>\n<meta property=\"article:author\" content=\"https:\/\/facebook.com\/AhmadAwais\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-14T21:52:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-09T16:24:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/learn.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ahmad Awais\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@MrAhmadAwais\" \/>\n<meta name=\"twitter:site\" content=\"@MrAhmadAwais\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ahmad Awais\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/deno\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/deno\\\/\"},\"author\":{\"name\":\"Ahmad Awais\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\"},\"headline\":\"Deno: Learn by Example\",\"datePublished\":\"2020-05-14T21:52:09+00:00\",\"dateModified\":\"2020-06-09T16:24:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/deno\\\/\"},\"wordCount\":640,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\"},\"image\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/deno\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/learn.jpg\",\"keywords\":[\"deno\"],\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ahmadawais.com\\\/deno\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/deno\\\/\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/deno\\\/\",\"name\":\"Deno: Learn by Example\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/deno\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/deno\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/learn.jpg\",\"datePublished\":\"2020-05-14T21:52:09+00:00\",\"dateModified\":\"2020-06-09T16:24:37+00:00\",\"description\":\"Deno 1.0 has just been released. It seems to be pretty awesome. Learn deno with Awais and build a couple of example projects.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/deno\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ahmadawais.com\\\/deno\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/deno\\\/#primaryimage\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/learn.jpg\",\"contentUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/learn.jpg\",\"width\":1920,\"height\":1080,\"caption\":\"Learn Deno\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/deno\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ahmadawais.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Deno: Learn by Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#website\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/\",\"name\":\"Ahmad Awais\",\"description\":\"Founder &amp; CEO of CommandCode.ai f\\\/k\\\/a Langbase | Google Developers Advisory Board (gDAB) founding member\",\"publisher\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ahmadawais.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\",\"name\":\"Ahmad Awais\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\",\"contentUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\",\"width\":2299,\"height\":1705,\"caption\":\"Ahmad Awais\"},\"logo\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\"},\"description\":\"Founder & CEO of \u2318 Command Code coding agent with taste. Founded Langbase.com, AI cloud to build, deploy, and scale AI agents with tools & memory \u00b7 Creator of Command.new. \\\"Awais is an awesome example for developers\\\" \u2014 Satya Nadella, CEO of Microsoft. NASA Mars Ingenuity Helicopter mission code contributor 8th GitHub Stars Award recipient with 5x GitHub Stars Award (Listed as GitHub's #1 JavaScript trending developer). Google Developers Expert Web DevRel. Ex VP Eng (DevTools & DevRel) Rapid \u00b7 Google Developers Advisory Board (gDAB) founding member \u00b7 AI\\\/ML\\\/DevTools Angel Investor (Replit, Resend, Daytona, Gumroad and you?) \u276f AI\\\/ML Advisory Board San Francisco, DevNetwork. Award-winning Open Source Engineering leader authored hundreds of open-source dev-tools and software libraries used by millions of developers, including Shades of Purple code theme and corona-cli. Linux Foundation (Node.js Committee Lead), OpenAPI Business Governing Board. Taught 108K+ developers via NodeCLI.com and VSCode.pro course. 274 million views, blogging for 24 yrs. \u276f Read more about Ahmad Awais or come say hi on \ud835\udd4f @MrAhmadAwais.\",\"sameAs\":[\"https:\\\/\\\/AhmadAwais.com\\\/\",\"https:\\\/\\\/facebook.com\\\/AhmadAwais\",\"https:\\\/\\\/instagram.com\\\/MrAhmadAwais\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/MrAhmadAwais\\\/\",\"https:\\\/\\\/x.com\\\/MrAhmadAwais\",\"https:\\\/\\\/youtube.com\\\/AhmadAwais\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Deno: Learn by Example","description":"Deno 1.0 has just been released. It seems to be pretty awesome. Learn deno with Awais and build a couple of example projects.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ahmadawais.com\/deno\/","og_locale":"en_US","og_type":"article","og_title":"Deno: Learn by Example","og_description":"Deno 1.0 has just been released. It seems to be pretty awesome. Learn deno with Awais and build a couple of example projects.","og_url":"https:\/\/ahmadawais.com\/deno\/","og_site_name":"Ahmad Awais","article_publisher":"https:\/\/facebook.com\/AhmadAwais","article_author":"https:\/\/facebook.com\/AhmadAwais","article_published_time":"2020-05-14T21:52:09+00:00","article_modified_time":"2020-06-09T16:24:37+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/learn.jpg","type":"image\/jpeg"}],"author":"Ahmad Awais","twitter_card":"summary_large_image","twitter_creator":"@MrAhmadAwais","twitter_site":"@MrAhmadAwais","twitter_misc":{"Written by":"Ahmad Awais","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ahmadawais.com\/deno\/#article","isPartOf":{"@id":"https:\/\/ahmadawais.com\/deno\/"},"author":{"name":"Ahmad Awais","@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b"},"headline":"Deno: Learn by Example","datePublished":"2020-05-14T21:52:09+00:00","dateModified":"2020-06-09T16:24:37+00:00","mainEntityOfPage":{"@id":"https:\/\/ahmadawais.com\/deno\/"},"wordCount":640,"commentCount":2,"publisher":{"@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b"},"image":{"@id":"https:\/\/ahmadawais.com\/deno\/#primaryimage"},"thumbnailUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/learn.jpg","keywords":["deno"],"articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ahmadawais.com\/deno\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ahmadawais.com\/deno\/","url":"https:\/\/ahmadawais.com\/deno\/","name":"Deno: Learn by Example","isPartOf":{"@id":"https:\/\/ahmadawais.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ahmadawais.com\/deno\/#primaryimage"},"image":{"@id":"https:\/\/ahmadawais.com\/deno\/#primaryimage"},"thumbnailUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/learn.jpg","datePublished":"2020-05-14T21:52:09+00:00","dateModified":"2020-06-09T16:24:37+00:00","description":"Deno 1.0 has just been released. It seems to be pretty awesome. Learn deno with Awais and build a couple of example projects.","breadcrumb":{"@id":"https:\/\/ahmadawais.com\/deno\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ahmadawais.com\/deno\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ahmadawais.com\/deno\/#primaryimage","url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/learn.jpg","contentUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/learn.jpg","width":1920,"height":1080,"caption":"Learn Deno"},{"@type":"BreadcrumbList","@id":"https:\/\/ahmadawais.com\/deno\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ahmadawais.com\/"},{"@type":"ListItem","position":2,"name":"Deno: Learn by Example"}]},{"@type":"WebSite","@id":"https:\/\/ahmadawais.com\/#website","url":"https:\/\/ahmadawais.com\/","name":"Ahmad Awais","description":"Founder &amp; CEO of CommandCode.ai f\/k\/a Langbase | Google Developers Advisory Board (gDAB) founding member","publisher":{"@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ahmadawais.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b","name":"Ahmad Awais","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg","url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg","contentUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg","width":2299,"height":1705,"caption":"Ahmad Awais"},"logo":{"@id":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg"},"description":"Founder & CEO of \u2318 Command Code coding agent with taste. Founded Langbase.com, AI cloud to build, deploy, and scale AI agents with tools & memory \u00b7 Creator of Command.new. \"Awais is an awesome example for developers\" \u2014 Satya Nadella, CEO of Microsoft. NASA Mars Ingenuity Helicopter mission code contributor 8th GitHub Stars Award recipient with 5x GitHub Stars Award (Listed as GitHub's #1 JavaScript trending developer). Google Developers Expert Web DevRel. Ex VP Eng (DevTools & DevRel) Rapid \u00b7 Google Developers Advisory Board (gDAB) founding member \u00b7 AI\/ML\/DevTools Angel Investor (Replit, Resend, Daytona, Gumroad and you?) \u276f AI\/ML Advisory Board San Francisco, DevNetwork. Award-winning Open Source Engineering leader authored hundreds of open-source dev-tools and software libraries used by millions of developers, including Shades of Purple code theme and corona-cli. Linux Foundation (Node.js Committee Lead), OpenAPI Business Governing Board. Taught 108K+ developers via NodeCLI.com and VSCode.pro course. 274 million views, blogging for 24 yrs. \u276f Read more about Ahmad Awais or come say hi on \ud835\udd4f @MrAhmadAwais.","sameAs":["https:\/\/AhmadAwais.com\/","https:\/\/facebook.com\/AhmadAwais","https:\/\/instagram.com\/MrAhmadAwais\/","https:\/\/www.linkedin.com\/in\/MrAhmadAwais\/","https:\/\/x.com\/MrAhmadAwais","https:\/\/youtube.com\/AhmadAwais"]}]}},"jetpack_featured_media_url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/05\/learn.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts\/7024","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/comments?post=7024"}],"version-history":[{"count":5,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts\/7024\/revisions"}],"predecessor-version":[{"id":7132,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts\/7024\/revisions\/7132"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/media\/7039"}],"wp:attachment":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/media?parent=7024"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/categories?post=7024"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/tags?post=7024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}