Closed und3fined closed 2 years ago
after review a guide for custom adapter So, deno adapter maybe out of date.
Output code that:
- Calls init <----- no call init
- Converts from the platform's request to a SvelteKit request, calls render, and converts from a SvelteKit response to the platform's
- Globally shims fetch to work on the target platform. SvelteKit provides a @sveltejs/kit/install-fetch helper for platforms that can use node-fetch
I added a pull request (https://github.com/pluvial/svelte-adapter-deno/pull/9), please accept it.
Hey, thank you very much for your input! I've started to work on a more comprehensive sync with the upstream changes to Svelte Kit and the adapter API, I'm still mid-way through reviewing the changes, and still a lot of testing to do, but it's already functional, you can track the development here: https://github.com/pluvial/svelte-adapter-deno/pull/10
Hi @jpaquim,
Currently, i'm work in a fork of svelte/adapter-node
in here!
I use oak
as Deno HTTP server and add more middleware for adapter, it maybe help more information run in Deno
A problem is your svelte-adapter-deno
no any allow middleware. It's a feature?
Cool! I'll take a look at your work, when I started I decided to go for opine
instead of oak
due to it being more Express-like, and being relatively similar in API to the Node adapter's polka
server. But I really like Koa, I need to give oak
a try.
As for middleware, it should be possible to add custom opine
-compatible middleware in a custom app
instance, by overriding the deps.ts
file. To make it more flexible, however, it would probably make sense to expose some kind of createServer
-like programmatic API, but I guess the main purpose, similar to the Node adapter, is to serve as a baseline implementation of what an adapter/server can look like.
Hey @und3fined! I have since also decided to move to oak
, if you're still interested you can take a look at the implementation, I've also been thinking more about external middleware support. Did you manage to get it working for your use case?
Hi @jpaquim Currently, I not focus to Deno, my work focus make Svelte work in golang, support SSR, SSG. Svelte Kit perfect for start, but i want to control server and Svelte as frontend. I completed my first goal, make svelte kit (SSR) run in golang, but more function can't work. In my mind, the next goal, maybe i'll make a tool like svelte kit.
Hi there,
Currently, I find a replace solution for ReactJS/Vuejs. And i choose Svelte
I use adapter with
SvelteKit demo app
no any change in code But I get a bug with routerWorkflow:
adapter
tosvelte.config.js
npm run build
Home
,About
,Todo
workfine/todo
page, with a refresh i get a error with trailing_slashAny reply for fix it?