Deno Local Development Guide
Run TypeScript web applications on localhost:8000 using Deno and the Fresh framework, featuring a built-in secure sandbox and toolchain.
Deno is a modern TypeScript/JavaScript runtime with built-in formatting, testing, and a permission model. The full-stack framework Fresh is based on Deno, with the local dev server defaulting to http://localhost:8000.
Installation
curl -fsSL https://deno.land/install.sh | sh
deno --versionWindows: irm https://deno.land/install.ps1 | iex
Quick Start with Fresh
deno run -A -r https://fresh.deno.dev my-app
cd my-app
deno task devAccess the browser at http://localhost:8000.
Simple HTTP Server
deno run --allow-net https://deno.land/[email protected]/http/file_server.ts
# Default http://localhost:4500Comparison with Node/Bun
| Item | Deno | Node |
|---|---|---|
| TS | Native support | Requires ts-node/compilation |
| Permissions | Explicit permissions like --allow-net | Default full permissions |
| npm | Supports npm: standard | Native ecosystem |
Frequently Asked Questions
Permission Errors
During development, commonly use deno task dev (configured with -A in the project) or --allow-net --allow-read.
Port 8000 Occupied
Fresh can change the port in dev.ts or through environment variables.
Summary
Deno + Fresh’s typical local address is http://localhost:8000, suitable for TypeScript-first full-stack projects that aim to reduce configuration files.