#Routes with Deno and Fresh

21 messages · Page 1 of 1 (latest)

inner sail
#

For web application using deno and fresh, what is recommended to serve backend api? Deno serve or fresh? What are the key trade-offs between Deno's serve and Fresh in terms of Performance & Scalability?

lean tree
#

Fresh uses Deno.serve under the hood

#

If you only need to serve a backend API hono or oak are probably the best fit

#

you can always handle everything manually yourself by going with no framework and just the Deno.serve API

inner sail
lean tree
inner sail
lean tree
#

It really doesn't matter which option you pick.

#

You can use Fresh to route all the things, you can also have your own router and shell out to Fresh, etc. I'd be reaaaaaallly surprised if you could even measure a difference between the two approaches

lean tree
#

pick the approach you prefer more. You cannot make a wrong choice

inner sail
lean tree
#

You're overthinking it. There is no difference in performance between the approaches. You can pick any of the options you have listed and you'll reach your goals

#

It's not a technical decision, instead it's a decision that depends much more on what your team's size is. What's the level of knowledge in that team, etc.

#

From a pure technical viewpoint there are zero differences when it comes to perf whatever approach you pick

inner sail
lean tree
inner sail
#

@lean tree
We want to route traffic from the main.ts only for all the sub domains and for frontend and backend of all subdomain and main domain also
Like domain.com
Api.domain.com
Docs.domain.com
Admin.domain.com

Then what should be main TS code like async manner to handle traffic or how?
Can you please help to implement this?
And is this the right approach or not?

inner sail
#

@lean tree Can you please help us here?

lean tree