I cant install deno by running this command: curl -fsSL https://deno.land/install.sh | sh
7 Replies
What's the problem?
Deno installed properly, you probably didn’t add the 2 export lines to your .bashrc or similar and thus think that deno didn’t install since the command doesn’t work
I can't work with deno
I will paste my code here, down below
import { serve } from "https://deno.land/std/http/server.ts";
// setup server
const server = serve({ port: 3000 });
console.log('http://localhost:3000/');
for await (const req of server) {
// serve index page
if (req.url === '/') {
req.respond({
status: 200,
body: await Deno.open('./public/index.html')
})
}
}
So what’s the error you get?
Your problem is not deno itself. It's your code. The error explains it pretty well:
Generally, I would use
Deno.serve
instead of the function you use, because it's deprecated (see screenshot below). Then, your code would look like this:
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number
curl -v https://deno.land error as above
curl -sI https://deno.land -o/dev/null -w '%{http_version}\n'
output 0