D
Deno

help

Deno.serve().shutdown doesn't exist?

IIndustrial11/2/2023
const server = Deno.serve({
hostname,
port,
})
server.shutdown()
const server = Deno.serve({
hostname,
port,
})
server.shutdown()
error: TS2339 [ERROR]: Property 'shutdown' does not exist on type 'Server'.
server.shutdown()
error: TS2339 [ERROR]: Property 'shutdown' does not exist on type 'Server'.
server.shutdown()
Running Deno 1.37.2
IioB11/2/2023
It's unstable It does exist if you use --unstable as far as I know
IIndustrial11/2/2023
okay
IIndustrial11/2/2023
Seems like https://deno.land/api@v1.38.0?s=Deno.serve returns a Deno.HTTPServer not a Deno.Server, which isn't available in the types in VSCode
Deno
Deno.serve | Runtime APIs | Deno
Serves HTTP requests with the given handler.
IIndustrial11/2/2023
Ok, it works with unstable
IioB11/2/2023
👍

Looking for more? Join the community!

Recommended Posts
Deno deploy see errorHow can i see the error why my build failed? It just returned `Error An internal server error occurrIn-browser testingI need to run some tests in a browser (Chrome, Firefox, Safari). Either by running a full test suiteCannot pass request object to workerI am trying to pass a request object to a worker file, but it is not receiving it inside of the workDoes the picture plugin for lume work with remote Images?I want to use the picture plugin with images that are from a remote location. Is there a way to get problem with prompt on windowsHi, I'm experiencing trouble when inputting 2 char long strings in prompt, it's doing \rDuplicate tailwind classes in Fresh projectAcross the board I'm seeing tailwind classes duplicated in my Fresh project. There doesn't seem to bTrouble accessing Deno KV via the Deno CLII'm trying to connect to a Deno KV via the CLI with the following simple code: ```ts //main.ts consBest way for application config in deno/ts?Hi. I'm alex and quite new to deno/typescript. Thank you for the quite big documenation it is a quitError trying to connect: Connection reset by peer (os error 104)Hello, i'm trying to deploy a my Fresh website using a Ubuntu 22.04 server but when I try to run my 500 on deno.land/x/fp_ts with ?s=eitherThe actual URL is https://deno.land/x/fp_ts@v2.11.4/mod.ts?s=eitherDeno.test without Deno namespace ?Hi there, Does someone know if it's possible to run a test from `Deno.test` without the Deno namespWASM / Extract and manipulate Array of DateI try to extract and manipulate an array of date in a function The rust fn doesn't compile. How to error: Uncaught Error: Input watch path is neither a file nor a directory.Im encountering a weird error when I run a code in Windows that was initially created in a OSX. It ES Module mocking workaroundHello all, I've been using Deno and Fresh for the past few weeks on a personal project and I love it