Flow
Flow•3w ago

Beginner question about Deno on the web

Hi, I've been looking into Deno recently and I love everything I'm reading so far but something I'm confused about is: what does it actually mean to use Deno for a website frontend? Isn't Deno a runtime? What can it do on the browser? I tried experimenting with SvelteKit and Deno by doing deno run -A npm:sv create, deno install, deno task dev, but as I expected, all I'm still writing is normal browser code. Where does Deno come in? Keep in mind that I'm not super well versed in a lot of web technologies so this might just be a misunderstanding on my part.
3 Replies
Doctor 🤖
Doctor 🤖•3w ago
Deno would be used for the backend to serve the stuff for the frontend. Like node. The difference to node though is that code written for Deno works in the web as long as it doesn't use any apis from the Deno namespace. Even if you're writing code for a completely static frontend, Deno can make that easier by offering web API linting, and let you test certain functionalities outside of the browser
Flow
FlowOP•3w ago
i see can deno also help with frontend with its package management? as in can it do all of its usual stuff like jsr and monorepos for the browser?
Doctor 🤖
Doctor 🤖•3w ago
You can target the browser instead of Deno in the config file, but you'll need to convert the code from typescript to JavaScript before sending it to the client.