Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.
You can easily understand the deno application (REST API, etc.) if you know how nodejs is working in those.
I made a youtube video for getting stared in deno.
Install Deno
- For windows, I prefer chocolatey
$ choco install deno
- For more options, You can visit their official documentation website https://deno.land
Getting Started
You can create applications like REST API as like in nodejs, Backend application for your full-stack application.
How to run your application?
$ deno run <app.js | app.ts>
- How to install global packages like denon?
Denon is exactly like a nodemon for deno.
$ deno install --allow-read --allow-run --allow-write --allow-net -f --unstable https://deno.land/x/denon/denon.ts
(Link can be changing if you are installing other packages)
Simple Example for creating http server in deno!
import { serve } from "https://deno.land/std@0.56.0/http/server.ts";
const s = serve({ port: 8080 });
console.log("http://localhost:8080/");
for await (const req of s) {
req.respond({ body: "It's my Deno world!" });
}
- If you're using vscode as an editor, then if dev blog will be useful for you
Top comments (0)