What is Deno?
Ryan Dahl - creator of Node.js and Deno
Differences from Node.js
🔒 Tight security layer
TypeScript by default
📦 Has no package manager
📚 Rich and modern std library
🔨 Built with TS and Rust
Live coding!
import { Application, Router } from "https://deno.land/x/oak/mod.ts";
const router = new Router();
const app = new Application();
router
.get("/", ({ response }) => {
response.body = "Hello world!";
})
.get("/:id", (ctx) => {
ctx.response.body = `Id: ${ctx.params.id}`;
})
.post("/echo", async ({ request, response }) => {
const body = await request.body();
response.body = body.value;
});
app.use(router.routes());
await app.listen({ port: 8000 });
Example HTTP server
Will Deno replace Node?
Will Deno replace Node?
Will Deno replace Node?
What's the best thing about Deno?
Useful links
- https://deno.land/manual/getting_started - official docs and tutorial
- https://flaviocopes.com/deno/Â - rich tutorial by @flaviocopes
- https://indepth.dev/a-quick-overview-of-the-deno-cli/Â - overview of Deno CLI commands
- https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno - official VS Code extension
- https://deno.land/x/Â - list of 3rd-party modules
Thank you!
✋😎
@kajetansw
kajetan.dev
What is Deno
By Kajetan ÅšwiÄ…tek
What is Deno
- 468