Questions tagged [deno]

A secure runtime for JavaScript and TypeScript.

Deno is a simple, modern, and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.

  • Secure by default. No file, network, or environment access, unless explicitly enabled.
  • Supports TypeScript out of the box.
  • Ships only a single executable file.
  • Has built-in utilities like a dependency inspector (deno info) and a code formatter (deno fmt).
  • Has a set of reviewed (audited) standard modules that are guaranteed to work with Deno deno.land/std
919 questions
10
votes
2 answers

How to write a TCP chat server with Deno?

One of the demos that really convinced me of the power of Node was the simple TCP chat server that Ryan Dahl presented in this video: https://www.youtube.com/watch?v=jo_B4LTHi3I&t=28m23s Here's what the code in the demo looked like: const net =…
10
votes
1 answer

Does Deno have a window object

Deno claims to be browser-compatible. Does that mean it has a window / navigator object and what would that mean in terms of things like setting window.location?
pguardiario
  • 53,827
  • 19
  • 119
  • 159
9
votes
1 answer

How to strongly type the Oak context state object in deno?

I want to strongly type the context.state object provided by oak in deno. I have already seen approaches how this could possibly work (e.g. Deno oak v10.5.1 context.cookies never being set), but have not yet managed to implement it myself in my own…
Limos21
  • 93
  • 5
9
votes
1 answer

JWT authentication with Deno

How to create and validate JSON Web Token in Deno? I am new to the Deno runtime, so it would be helpful to have a sample to get started with JWT in Deno.
Laura Nutt
  • 303
  • 2
  • 6
9
votes
6 answers

Typescript Import Problem after updating Deno

I recently update deno from v1.3.0 to v1.4.0. Before updating, my code doesn't have any problem, but after that i have this error: error: TS1205 [ERROR]: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export…
BookShell527
  • 176
  • 2
  • 8
9
votes
4 answers

Deno Oak Disable Cors

I am trying to 'connect' my small React JS app with my Deno API backend on my local environment with fetch(). const apiUrl = `http://localhost:8000`; try{ fetch(apiUrl) .then((res) => res.json()) .then((repos) => { …
Nezir
  • 6,727
  • 12
  • 54
  • 78
9
votes
3 answers

Usage of linters/linting tools within Deno

I am currently exploring Deno as proof-of-concept, and I am trying to find suitable way to setup linting within the project. Here is part of the eslint configuration that I am thinking of setting up, but I do understand that this can cause more…
wentjun
  • 40,384
  • 10
  • 95
  • 107
9
votes
2 answers

CLI REPL with Deno

I would like to build a CLI application using Deno however I can't find a module that allows me to keep prompting the user for interaction similar to command line applications to the REPL module on Node.js Any suggestions?
9
votes
5 answers

GraphQL server with Deno

It works just once for the below code import { graphql, GraphQLSchema, GraphQLObjectType, GraphQLString, buildSchema, } from "https://cdn.pika.dev/graphql/^15.0.0"; import { serve } from "https://deno.land/std@0.50.0/http/server.ts"; var…
Hemant Metallia
  • 213
  • 2
  • 11
9
votes
4 answers

Is there any alternative ajv(json-schema validator) for deno?

I'm looking for a ajv-like json schema validator for deno. Wondering is there any alternative?
Eric Miao
  • 91
  • 1
  • 2
9
votes
4 answers

Deno allow all permissions

I often find myself typing at least two or three permission options when playing with Deno: deno run --allow-net --allow-read --allow-env app.ts There's a way to escape explicit permissions.
Evandro Pomatti
  • 13,341
  • 16
  • 97
  • 165
9
votes
2 answers

Deno permissions (--allow-net)

The one day old docs is not clear enough for me to know.. How to give global permission to all websites (for debugging stuff) in my deno project like.. deno run --allow-net=* deno.ts or something like that
Youssef Siam
  • 194
  • 1
  • 8
8
votes
1 answer

Are loading a JavaScript ES6 module via