pluvial / svelte-adapter-deno

A SvelteKit adapter for Deno
https://svelte-adapter-deno.deno.dev/
MIT License
313 stars 14 forks source link

use Deno.listen and serveFile #21

Closed TheHadiAhmadi closed 2 years ago

TheHadiAhmadi commented 2 years ago

Hi @jpaquim

here is the smallest changes which I could do to replace oak with deno.listen

please share your taughts and suggestions with me

thanks

jpaquim commented 2 years ago

Thanks for the PR! It looks pretty good, simpler than the other one, and sendFile seems like a good choice here. Let me take a better look over the weekend, I'll either comment a couple of things, or just commit a couple of suggested changes for you to take a look.

jpaquim commented 2 years ago

Hey there @TheHadiAhmadi sorry for the delay, I've been also trying to understand and fixing a few other issues with the adapter, as well as updating it to the latest SvelteKit changes and reading up on the recently introduced features in Deno Deploy.

I see that you've forked into https://github.com/TheHadiAhmadi/svelte-adapter-deno-deploy and have improved a few things I'm also interested in having here 😄. Do let me know if you wish to stick together instead of forking, given the overlap in scope I think having a single adapter is best in the long run.

TheHadiAhmadi commented 2 years ago

Hi @jpaquim thanks for this message No problem, when I saw this branch has conflicts with main branch, I decided to close the PR

The deno-deploy github action was very helpful and I updated adapter (and renamed) after that addition.

I like to work together but these days I am busy and I am not working on minibase (my side project which needs svelte-adapter-deno ), you can copy-paste useful codes(if there is any 😅) from my fork here.

My goal is to host my project in deno-deploy Some useful features which is good to have are: 1- pass custom platform object from deno and use it in sveltekit endpoints 2- be able to use npm packages in deno after build (import_map + skypack.dev)

I implemented first one (non-standard way) And for second one I can work on it if you agree(we can talk about it in a new issue)

I think having a single adapter is best in the long run

100% agree, I will delete my fork when we implemented one of the above features here (or better way to connect with database)

Thank you

TheHadiAhmadi commented 2 years ago

My only problem with deno is I am not able to use npm packages with deno, for example 'mongodb', 'jsonwebtoken', ...

Do you have any plan to support packages like 'mongodb' with this adapter?

And also what do you think if we support using 'Deno', 'WebSocket', 'crypto',... globals, inside sveltekit endpoints? is it possible? (See how fetch is available everywhere)