Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo server #3083

Closed
JuanRaymundo opened this issue Oct 7, 2019 · 6 comments · Fixed by denoland/std#625 or #3084
Closed

Demo server #3083

JuanRaymundo opened this issue Oct 7, 2019 · 6 comments · Fixed by denoland/std#625 or #3084

Comments

@JuanRaymundo
Copy link

JuanRaymundo commented Oct 7, 2019

I can not run the denno(demo) server
deno https://deno.land/std/examples/echo_server.ts

this demo is here
https://github.com/denoland/deno/blob/master/website/manual.md#tcp-echo-server

@bartlomieju
Copy link
Member

Hi! Thanks for opening the issue, can you show output from the command?

@JuanRaymundo
Copy link
Author

Hi, this is the error :)

image

@bartlomieju
Copy link
Member

We recently had some changes to listen API it looks like we forgot to update the example

@JuanRaymundo
Copy link
Author

jaja oook, I've recently met deno and I will wait the fix, thanks men 👍

@ry
Copy link
Member

ry commented Oct 7, 2019

@JuanRaymundo I've fixed manual example in the above PR. Here is the correct code for v0.20.0

const listener = Deno.listen({ port: 8080 });
console.log("listening on 0.0.0.0:8080");
while (true) {
  const conn = await listener.accept();
  Deno.copy(conn, conn);
}

@JuanRaymundo
Copy link
Author

thank you :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants