DEV Community

Cover image for Basic Setup for Deno!
Vuelancer
Vuelancer

Posted on • Edited on

1 2

Basic Setup for Deno!

  • 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.

Alt Text

I made a youtube video for getting stared in deno.


Install Deno

  • For windows, I prefer chocolatey
$ choco install deno
Enter fullscreen mode Exit fullscreen mode
  • 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>
Enter fullscreen mode Exit fullscreen mode
  • 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
Enter fullscreen mode Exit fullscreen mode

(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!" });
}
Enter fullscreen mode Exit fullscreen mode

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay