Upgrade from Node.js to Deno
Deno
- Millions of community modules
- Built on V8 JavaScript engine
- Built with web standard APIs
- Runtime security by default
- Built-in TypeScript, JSX, formatter, linter, and test
- Easily embeddable with Rust and Tokio
Node
Develop 10× faster
Don’t let anything slow you down with Deno
$ deno lint --watch
Deno ships with a built-in code linter to help you avoid bugs and code rot.
Learn moreDeno.serve(() => new Response("Hello!"));
$ deno compile --allow-net server.ts
$ ./server
Listening on http://localhost:8000/
Instantly create standalone executables from your Deno program. It even supports cross-compiling for other platforms!
Learn more$ deno test main_test.ts
Deno.test("1 + 2 = 3", () => {
const x = 1 + 2;
console.assert(x == 3);
});
Deno provides a test runner and assertion libraries as a part of the runtime and standard library.
Learn more$ deno fmt --line-width=120
Deno's built-in code formatter (based on dprint) beautifies JavaScript, TypeScript, JSON, and Markdown.
Learn moreSeamless persistence with Deno KV
The Deno runtime ships with Deno KV, a key/value database designed for globally distributed applications.
Go from development to production on Deno Deploy with no API keys or infrastructure to configure.
Built for the modern web
Consistent code from browser to backend
import express from "npm:express@4";
const app = express();
app.get("/", function (_req, res) {
res.send("hello");
});
app.listen(3000, () => {
console.log("Express listening on :3000");
});
$ deno run --allow-net --allow-read --allow-env server.js
Millions of community modules
High performance networking
- HTTPS (encryption)
- WebSockets
- HTTP2
- Automatic response body compression
Deno.serve((req) => new Response("Hello world"));
Bigger is better
Throughput, requests per sec
Built for the cloud
Deno Deploy
The easiest way to host your Deno projects.
- Globally distributed
- Deploy in seconds
- Built-in key/value database
- Integrate with GitHub for CI/CD
- Run static sites, apps, and edge functions
- No config needed
- One-click immediate rollbacks
Also runs on:
- DockerOfficial Docker image
- AWS Lambda distributionhayd/deno-lambda
- DigitalOceanHow to Deploy Deno to Digital Ocean
- Cloudflareskymethod/denoflare
- Google Cloud RunHow to Deploy to Google Cloud Run
Secure by default
Controlled access
Deno restricts access to sensitive runtime APIs by default, protecting your infrastructure from malicious code.
Configure granular access to the filesystem, network, and system environment, so your code only has access to the resources it needs.
Dive into Deno code
function handler(_req: Request): Response {
return new Response("Hello, World!");
}
Deno.serve(handler);
Code examples
Fresh
Fresh is a modern web framework, designed from the ground up for the Deno runtime on edge servers.
- Built for speed, reliability, and simplicity
- Just-in-time rendering at the edge
- Island-based client hydration
- Zero runtime overhead
SaaSKit
Built on top of Fresh, the SaaSKit template app includes authentication, billing, and more.
- User authentication with oAuth 2.0
- Recurring payments implemented with Stripe
- Sessions and authorization pre-built
- Fast, lightweight persistence with Deno KV