<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
    <title>PrendsMoi&#39;s Blog - Deno</title>
    <link rel="self" type="application/atom+xml" href="https://liuhgxu.com/tags/deno/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://liuhgxu.com"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-08-30T00:00:00+00:00</updated>
    <id>https://liuhgxu.com/tags/deno/atom.xml</id>
    <entry xml:lang="zh">
        <title>Deno 学习（一）</title>
        <published>2026-08-30T00:00:00+00:00</published>
        <updated>2026-08-30T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://liuhgxu.com/blog/deno-learn-1/"/>
        <id>https://liuhgxu.com/blog/deno-learn-1/</id>
        
        <content type="html" xml:base="https://liuhgxu.com/blog/deno-learn-1/">&lt;h1 id=&quot;deno-xue-xi-yi&quot;&gt;Deno 学习（一）&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;安装deno，官网有详细的安装教程&lt;a rel=&quot;external&quot; href=&quot;https://deno.land/&quot;&gt;Deno&lt;/a&gt;。安装完成后可以在命令窗口输入deno命令，如下图👇&lt;/p&gt;
&lt;img src=&quot;https://img.liuhgxu.com/img/image-20200701111614681.png&quot; alt=&quot;image-20200701111614681&quot; style=&quot;zoom:50%;&quot; /&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;使用VsCode并安装Deno的相关插件Deno &amp;amp; [Deprecated] Deno，如果不安装，在进行Deno模块引入时会出现红色的波浪号警告，因为在ts中是不需要文件的扩展名，且ts不支持从url中导入模块。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;使用本地服务自动更新&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;1.&lt;/span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; deno upgrade&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;2.&lt;/span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; deno install --allow-read --allow-run --allow-write -f --unstable https://deno.land/x/denon/denon.ts&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;3.&lt;/span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; denon -h&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;4.&lt;/span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; denon run --allow-env --allow-net demo.ts&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;demo.ts代码&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://img.liuhgxu.com/img/code.png&quot; alt=&quot;code&quot; /&gt;&lt;/p&gt;
&lt;p&gt;5.通过deno run --allow-net demo.ts 运行，打开localhost:9000即可看见效果&lt;/p&gt;
</content>
        
    </entry>
</feed>
