SabaMazmishvili
I cant install deno by running this command: curl -fsSL https://deno.land/install.sh | sh
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')
})
}
}
12 replies