deno handbook
Preface The Deno Handbook 2 Preface The Deno Handbook follows the 80/20 rule: learn in 20% of the time the 80% of a topic. In particular, the goal is to get you up to speed quickly with Deno. This Twitter @flaviocopes. Enjoy! 3 The Deno Handbook I explore new projects every week, and it's rare that one hits my attention so much as Deno did. What is Deno? If you are familiar with Node.js, the server-side JavaScript ecosystem, then Deno is just like Node. Except deeply improved in many ways. Let's start from a quick list of the features I like the most about Deno: It is based on modern features0 码力 | 46 页 | 4.11 MB | 1 年前3Get started with Deno
Get started with Deno @hijiangtao 示例一 Hello world import { serve } from "https://deno.land/std@0.69.0/http/server.ts"; const s = serve({ port: 8000 }); console.log("http://localhost:8000/"); for 示例二 Chat room deno run --allow-net --allow-read https://deno.land/std/examples/chat/server.ts ©hijiangtao 目录 1 / What is Deno 2 / Deno and Node 3 / Debate on Deno What is Deno “Deno 是基于 V8 并采用 Rust JavaScript 和 TypeScript 运行时环境。” Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. https://deno.land/ ©hijiangtao Deno / 基于 V8 V8 是一个由 Google 开发的开源0 码力 | 43 页 | 1.51 MB | 1 年前3Node 的设计错误
免责声明:我只是提出了了⼀一个初具雏形的原型。 除⾮非你急于卷起袖⼦子跳进 lldb,否则不不要费劲去尝试建造它。 即便便如此… Deno https://github.com/ry/deno V8上⼀一个安全的 TypeScript 运⾏行行时 Deno ⽬目标:安全 • 利利⽤用 JavaScript 是⼀一个安全沙箱的事实。 默认情况下,脚本应该在没有任何⽹网络或⽂文件系统写访问的情况下运⾏行行。 有两个本地函数: send 和 rev。 这既简化了了设计,⼜又使系统更更易易于审核。 Deno ⽬目标:简化模块系统 • 没有试图与现有 Node 模块兼容。 • 导⼊入的只是相对的或绝对的URL。(参⻅见语义化版本) import { test } from "https://unpkg.com/deno_testing@0.0.5/testing.ts" import { log 能再次获取资源。 • Vendoring 可以通过指定⾮非默认缓存⽬目录来完成。 Deno ⽬目标:内置于可执⾏行行⽂文件中的 TS 编译器器 • TS 是绝对出⾊色的。 它终于交付了了实⽤用的可选语⾔言。 允许代码⽆无缝增⻓长—从快速⼊入侵到⼤大型的,结构良好的组织。 • Deno 挂接到 TS 编译器器以执⾏行行构建⼯工件的模块解析和增量量缓存。 • 未修改的 TS0 码力 | 28 页 | 767.84 KB | 1 年前3Easy routing for local development - Using Traefik for routing paths to web apps - Setup a reverse proxy to simplify routing
home: restart: always image: denoland/deno:1.11.2 command: run --allow-net --allow-read --allow-env /app/server.ts labels: - traefik.http.routers.home.rule=Host(`deno-mfe.localhost`) - traefik.http.services l s . • traefik.http.routers.home.rule=Host(`deno-mfe.localhost`) d e fi n e s t h e d om ai n w e w an t t o u s e , i n t h i s c as e I c h os e deno-mfe.localhost s o n av i gat i n g t o i t w i t h e s am e r u l e b u t ad d a PathPrefix l i k e t h i s traefik.http.routers.shop.rule=Host(`deno-mfe.localhost`) && PathPrefix(`/shop`). T h i s l ab e l t e l l s T r ae fi k t o m at c h a r e0 码力 | 5 页 | 576.61 KB | 1 年前3《Slides Dev Web》 05. JavaScript & DOM
DOMContentLoaded would be much more appropriate, so be cautious. MDN: DOMContentLoaded26 Node.js27 / Deno28 • Node.js : une implémentation hors navigateur – environnement d’exécution + bibliothèques – event org/en/docs/Web/Events/DOMContentLoaded 27https://nodejs.org 28https://www.reddit.com/r/node/comments/nx9qqr/deno_vs_nodejs_a_comparison_you_need_to_know/ 29https://www.npmjs.com 30https://colorlib.com/wp/npm-packages-node-js/0 码力 | 10 页 | 91.95 KB | 1 年前3Cilium v1.5 Documentation
immediate operands. The encoding of op itself provides informa�on on which mode to use ( BPF_X for deno�ng register-based opera�ons, and BPF_K for immediate-based opera�ons respec�vely). In the la�er case on the current packet for pushing into upper layers. Last but not least, XDP_ABORTED which serves deno�ng an excep�on like state from the program and has the same behavior as XDP_DROP only that XDP_ABORTED0 码力 | 740 页 | 12.52 MB | 1 年前3Kotlin Language Documentation 1.9.20
Kotlin/Wasm applications, you need a VM that supports Wasm Garbage Collection (GC), for example, Node.js or Deno. Wasmtime, WasmEdge, and others are still working towards full Wasm GC support. To import a WASI Kotlin/Wasm applications, you need a VM that supports Wasm Garbage Collection (GC), for example, Node.js or Deno. Wasmtime, WasmEdge, and others are still working towards full Wasm GC support. To import a WASI0 码力 | 1299 页 | 32.44 MB | 1 年前3Kotlin 1.9.10 官方文档 中文版
Kotlin/Wasm applications, you need a VM that supports Wasm Garbage Collection (GC), for example, Node.js or Deno. Wasmtime, WasmEdge, and others are still working towards full Wasm GC support. To import a WASI0 码力 | 3753 页 | 29.69 MB | 1 年前3Kotlin 官方文档中文版 v1.9
Kotlin/Wasm applications, you need a VM that supports Wasm Garbage Collection (GC), for example, Node.js or Deno. Wasmtime, WasmEdge, and others are still working towards full Wasm GC support. To import a WASI0 码力 | 2049 页 | 45.06 MB | 1 年前3
共 9 条
- 1