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

Thank you!

โœ‹๐Ÿ˜Ž

@kajetansw

kajetan.dev

Made with Slides.com