Repository navigation
error 10013
#16181
|
Hi! import { serve } from "https://deno.land/std@0.150.0/http/server.ts";
import { Server } from "https://deno.land/x/socket_io@0.1.1/mod.ts";
const io = new Server();
io.on("connection", (socket) => {
console.log(`socket ${socket.id} connected`);
socket.emit("hello", "world");
socket.on("disconnect", (reason) => {
console.log(`socket ${socket.id} disconnected due to ${reason}`);
});
});
await serve(io.handler(), {
port: 3000,
});And before that code I tried to run import { serve } from "https://deno.land/std@0.50.0/http/server.ts";
const server = serve({ port: 8008 });
console.log("http://localhost:8008/");
for await (const req of server) {
if (req.url === '/') {
req.respond({
status: 200,
body: await Deno.open('./public/index.html')
});
}
}and it shows the same error. Is there any way to fix this or to run deno properly? |
Answered by
kitsonk
Oct 6, 2022
Replies: 1 comment 2 replies
|
This is not an issue with Deno, or how you are running |
2 replies
Answer selected by
kitsonk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is not an issue with Deno, or how you are running
deno. The error originates from the underlying operating system indicating that environment/users thatdenois running under does not have permissions to open a socket to listen for HTTP connections.