Install Deno v2.4.5
irm https://deno.land/install.ps1 | iex
// Use .ts files with no compile step:
import type { Person } from "./types.ts";
import { Permissions } from "./permissions.ts";
// Author TypeScript with zero setup or configuration:
export interface User extends Person {
id: number;
permissions: Permissions[];
}
Modern language features, built-in
Consistent code from browser to backend
Deno prioritizes web standard APIs, maximizing code reuse between browser and server and future-proofing your code.
Skip past APIs listWorkerMessageEventWritableStreamDefaultControllerstructuredCloneDecompressionStreamCompressionStreamsetIntervalPromiseRejectionEventclearIntervalBlobfetchbtoalocalStorageNavigatorclearTimeoutReadableStreamDefaultControllerResponse.json()EventTargetcachesCacheStorageMessagePortLocationDedicatedWorkerGlobalScopeWebSocketqueueMicrotaskCryptoKeyErrorEventPerformanceMarkWorkerNavigatorReadableStreamBYOBRequestTextDecoderWorkerLocationTextEncoderStreamReadableByteStreamControllerTransformStreamFileCustomEventEventperformanceDOMExceptionReadableStreamBYOBReadercryptoCloseEventURLPatternPerformanceEntryconsoleglobalThis.close()CryptoRequestReadableStreamStorageWebAssemblyTextDecoderStreamURLSearchParamsProgressEventFileReaderByteLengthQueuingStrategyBeforeUnloadEventTextEncoderatobglobalThis.alert()setTimeoutPerformanceHeadersWorkerGlobalScopeAbortSignalFormDataResponseMessageChannelURLBroadcastChannelTransformStreamDefaultControllerSubtleCryptoCacheWritableStreamAbortControllerReadableStreamDefaultReaderPerformanceMeasureWritableStreamDefaultWriter
Code linter
Deno ships with a built-in code linter to help you avoid bugs and code rot.
Learn more$ deno lint --watch
Test runner
Deno provides a test runner and assertion libraries as a part of the runtime and standard library.
Learn more// server_test.ts
Deno.test("1 + 2 = 3", () => {
const x = 1 + 2;
console.assert(x == 3);
});
$ deno test server_test.ts
Standalone executables
Instantly create standalone executables from your Deno program. It even supports cross-compiling for other platforms!
Learn moreDeno.serve(req => new Response("Hello!"));
$ deno compile --allow-net server.ts
Compile file:///tmp/server.ts to server
$ ./server
Listening on http://localhost:8000/
Code formatter
Deno's built-in code formatter (based on dprint) beautifies JavaScript, TypeScript, JSON, and Markdown.
Learn more$ deno fmt --line-width=120
Prevent supply chain attacks
Stop worrying about npm modules introducing unexpected vulnerabilities. Deno restricts access to the file system, network, and system environment by default, so code can access only what you allow.
Other runtimes
$ node random.jsExecuting random.js...🚨 File system compromised!
Deno
$ deno random.js⚠️ Deno requests write accessAllow? [y/n/A]$ n❌ Denied write accessExited
server.ts
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.ts
Compatible with millions of npm modules
Include modules from npm in your Deno projects using
npm:
specifiers.High-performance networking
Out of the box support for:
- HTTPS (encryption)
- WebSocket
- HTTP2
- Automatic response body compression
Bigger is better
Throughput, requests per sec
Deno
200,059Node
94,990Go further with Deno cloud products
Products built on Deno to help you deploy TypeScript and JavaScript easily and securely at any scale.
Deno Deploy
For developers looking for the simplest way to host web apps and APIs
- Fully managed serverless solution
- Globally distributed
- Built-in key/value database, queues, cron, and more
- Integrated directly with GitHub
Deno Subhosting
For SaaS companies looking to run user code securely
- Secure sandboxed functions
- Automatic scaling and provisioning
- Globally distributed
- Manage via a simple API
Build fast sites fast
Author routes as the JSX (or TSX) components you already know and love, and Fresh handles dynamic server-side rendering by default.
/routes/index.tsx
export default function HomePage() {
return (
<div>
<h1>HTML fresh from the server!</h1>
<p>
Delivered at
{new Date().toLocaleTimeString()}
</p>
</div>
);
}
/islands/Counter.tsx
import { useSignal } from "@preact/signals";
export default function Counter() {
const count = useSignal<number>(0);
return (
<button onClick={() => count.value += 1}>
The count is {count.value}
</button>
);
}
Ship less JavaScript
Island-based architecture lets you opt in to only the JavaScript you need, for absolutely minimal runtime overhead.
Our vibrant community
“I knew this was gonna happen! Deno is truly building the fastest, most secure and personalizable JS runtime!”
“Deno's security model is PERFECT for this type of script. Running a script from a rando off the internet? It asks for read access to only the CWD and then asks for access to the file it wants to write to. 👏”
“I really think Deno is the easiest and most capable JS runtime. URL imports are slept on.”
“npm packages in Deno 👀 That’s an exciting development for those of us building at the edge.”
“This Deno thing is fast, no doubt about it. #denoland”
“Deno: I have to use the browser APIs cause they are everywhere, and everywhere is my target runtime (the web). The runtime that tries to mirror browser APIs server side makes my life easiest.”
“Deno is fantastic. I am using it to level up a bit in terms of JavaScript and TypeScript and it is the easiest way to get going. Their tooling is like 100x simpler than all the usual Node stacks.”