zoukankan      html  css  js  c++  java
  • Deno 加载依赖包出错

    视频讲解

    https://www.bilibili.com/video/BV1qK4y1x7VG/

    在开发过程中,经常遇到DNS解析域名错误的问题。导致js依赖包没法下载

    我们一起来完成以下步骤:

    1. 先来发现问题
    2. 域名是否能访问?
    3. 解析域名(https://www.ipaddress.com/)的IP。在没有使用 openssl 等软件情况下是否能ping通
    4. 修改Hosts文件(C:WindowsSystem32driversetc)
    5. 再重新run一下应用

    #main.ts

    import { Application, Router } from "https://deno.land/x/oak/mod.ts";
    
    const router = new Router();
    const app = new Application();
    
    router.get("/",(ctx) =>{
        ctx.response.body="Hello World ";
    })
    
    app.use(router.routes());
    app.use(router.allowedMethods());
    
    await app.listen({ port:8000 });
    

     

  • 相关阅读:
    JMS API学习总结(一)
    java读取properties配置文件
    如何创建并运行java线程
    JS
    JS
    JS
    JS
    IE
    JS
    JS
  • 原文地址:https://www.cnblogs.com/JavaWeiBianCheng/p/13051266.html
Copyright © 2011-2022 走看看