Deno, the next-generation JavaScript runtime (original) (raw)
Install Deno v2.3.5
curl -fsSL https://deno.land/install.sh | sh
Native TypeScript support
The Deno runtime natively supports TypeScript, JSX, and modern ECMAScript features with zero configuration.
Modern language features, built-in
Built on web standards
Whenever possible, Deno implements web standard APIs on the server. Deno actively participates in TC39 and WinterCG to help move the web forward.
Consistent code from browser to backend
Deno prioritizes web standard APIs, maximizing code reuse between browser and server and future-proofing your code.
Batteries included
The essential tools you need to build, test, and deploy your applications are all included out of the box.
Code linter
Deno ships with a built-in code linter to help you avoid bugs and code rot.
Test runner
Deno provides a test runner and assertion libraries as a part of the runtime and standard library.
// 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!
Deno.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.
$ deno fmt --line-width=120
Secure by default
A program run with Deno has no file, network, or environment access unless explicitly enabled.
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.js
Executing random.js...
🚨 File system compromised!
Deno
$ deno random.js
⚠️ Deno requests write access
Allow? [y/n/A]
$ n
❌ Denied write access
Exited
Backwards compatible with Node.js
Deno's Node.js compatibility layer means you can bring the best of the Node ecosystem with you to Deno.
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
Go 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
The Freshest web framework
Fresh is a server-rendered web framework for Deno, built with Preact for blazing speed and instant productivity.
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.
Ship less JavaScript
Island-based architecture lets you opt in to only the JavaScript you need, for absolutely minimal runtime overhead.