惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
雷峰网
雷峰网
博客园 - 叶小钗
V
V2EX
博客园 - Franky
博客园_首页
小众软件
小众软件
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
阮一峰的网络日志
阮一峰的网络日志
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
T
The Blog of Author Tim Ferriss
U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
S
SegmentFault 最新的问题
B
Blog RSS Feed
博客园 - 【当耐特】
D
Docker
N
Netflix TechBlog - Medium

Deno

Deno 2.8 | Deno Claw Patrol: an open-source security firewall for agents | Deno Fresh 2.3: Zero JS by default, View Transitions, and Temporal support | Deno Deno 2.7: Temporal API, Windows ARM, and npm overrides | Deno Build a dinosaur runner game with Deno, pt. 6 | Deno Build a dinosaur runner game with Deno, pt. 5 | Deno Deno Deploy is Generally Available | Deno Introducing Deno Sandbox | Deno Build a dinosaur runner game with Deno, pt. 4 | Deno Build a dinosaur runner game with Deno, pt. 3 | Deno Build a dinosaur runner game with Deno, pt. 2 | Deno React / Next.js Denial-of-Service Vulnerability: Deno Deploy users protected | Deno Deno 2.6: dx is the new npx | Deno Build a dinosaur runner game with Deno, pt. 1 | Deno React Server Functions / Next.js Vulnerability: Deno Deploy users protected | Deno My highlights from the new Deno Deploy | Deno Deno's Other Open Source Projects | Deno How Deno protects against npm exploits | Deno Help Us Raise $200k to Free JavaScript from Oracle | Deno Deno 2.5: Permissions in the config file | Deno Fresh 2.0 Graduates to Beta, Adds Vite Support | Deno Deno 2.4: deno bundle is back | Deno JavaScript™ Trademark Update | Deno What's coming to JavaScript | Deno A brief history of JavaScript | Deno Reports of Deno's Demise Have Been Greatly Exaggerated | Deno An Update on Fresh | Deno How Plaid migrated 100 services to a new database platform 5x faster with Deno | Deno Deno 2.3: Improved deno compile, local npm packages, and more | Deno Add JSR packages with pnpm and Yarn | Deno
Announcing Hono on JSR | Deno
Andy Jiang · 2024-06-25 · via Deno

JSR is a modern JavaScript registry intended to simplify publishing and consuming JavaScript and TypeScript modules, while also moving the ecosystem forward by supporting and promoting web standards. Since its launch, JSR has been well received by the community, with over 250 new packages being published each week.

Today, we’re thrilled to announce that Hono is now available on JSR.

Hono is a fast, lightweight, batteries-included, cross-platform server routing framework that has first class TypeScript and web standard API support.

Using Hono via JSR offers an excellent developer experience, with fully featured documentation and type definitions right in your text editor.

Installing Hono

You can get started with Hono from JSR using the following command:

deno add @hono/hono

Or using npm:

npx jsr add @hono/hono

The above command will generate a deno.json file, listing all your project dependencies.

// deno.json

{
  "imports": {
    "@hono/hono": "jsr:@hono/hono^4.4.5"
  }
}

You can then import the serverless driver to your main.ts file:

import { Hono } from "@hono/hono";

const app = new Hono();

app.get("/", (c) => {
  return c.text("Hello Deno!");
});

Deno.serve(app.fetch);
For other runtime examples, please refer to Hono’s documentation.

Finally, you can run the following command to execute:

​​deno run -A main.ts

Note, you can also scaffold your Hono project with the following command:

deno run -A npm:create-hono@latest

Currently, only the deno template selection will use Hono from JSR.

What’s next?

With Hono on JSR, you can build a lightweight, fast server with API routes that can run in any JavaScript environment. Your text editor will pull in type definitions and relevant documentation so that you can be more productive.

🚨️ Read more about JSR 🚨️