Edivado
set response header from within `createServerData$()` callback
leaving this here: https://github.com/solidjs/solid-start/pull/485#issuecomment-1676906831
also @giyomoon created a patch that let's you use responseHeaders in both cases https://github.com/solidjs/solid-start/pull/485#issuecomment-1677699897
8 replies
Missing Http method returns 200 status code on api route
Ok strange... opened a PR. Should cover it. It's a bit more complicated than I thought. https://github.com/solidjs/solid-start/pull/1041
20 replies
Building with SSR false starts (and doesn't close) listeners
Aww I don't feel like I have done much but totally appreciate the kind words. 😄
Regarding the current spa build process. The longer I think about it and look at the code it's starting to seem insane to call the server (through vite dev or directly) to generate the index.html. At the end its just the entry point for the client build (single script tag pointing to entry-client). I feel like I am missing something but it looks to me as if generating the index.html from a hardcoded string would be the same. It doesn't seem like its creating anything dynamically or using something provided by the user. nvm I kind of understand now why it is like that.
I am also not too sure about creating the websocket server in entry-server but thats probably me not knowing the use case. My first thought would be to run it separately or trying to run it as a middleware if possible.
18 replies
Building with SSR false starts (and doesn't close) listeners
Anyway... in this specific case I don't see any other solution beside what you did and try to terminate all related processes. Only thing I see avoiding this is providing an index.html in the project root so the build process does not run entry-server.
18 replies
Building with SSR false starts (and doesn't close) listeners
Regarding this:
Edit: as a side note I was also able to "fix" this by changing the stdio option. But in this specific case they bring their own bugs
Was this with detached set to true? I didn't notice any difference by just changing stdio.18 replies
Building with SSR false starts (and doesn't close) listeners
My suggestion has a similar problem which I expected after seeing the server initialization. Building works but the websocket server will block until its explicitly closed (ctrl+c). 🤣
18 replies
Building with SSR false starts (and doesn't close) listeners
Sure but If you could help me understand / reproduce the issue that would be cool. I don't quite know how to reproduce EADDRINUSE on my Windows machine. Any hint/steps woulb be nice. Like where do I need to add the long running listener or was this referring to vite?
18 replies
Replace part of string with a component
Its fine no need to. Out of my own curiosity I took a closer look at the libs implementation. I don't understand why it would use split instead of matchAll after reading about splits behaviour with capturing groups. I made a small gist with matchAll. https://gist.github.com/edivados/0b24fd7e876d1940fd273361a31ffe1c (you have to use g flag with matchAll)
28 replies