Replies: 7 comments 1 reply
-
I haven't explored this approach yet. But you are right, in a sense nitro is built of two parts. The rollup based bundler for the server that can make our servers work in any environment. And a wrapper around |
Beta Was this translation helpful? Give feedback.
-
It looks like the dev server is also hard coded here to one model in Nitro instead of allowing adaptable dev servers. I.e. for CloudFlare using Wrangler isn't possible is it, due to the hard coded Vinx dev server code only having one model. (see also: https://nitro.unjs.io/deploy/providers/cloudflare) Or if I wanted to run this as SSR inside GraalVM from a JVM server and have an adapter to use this as middleware and I handle all file system activities, the dev server breaks this all again due to a hard coded single model. The dev server is important for adapters as much as the production mode is. |
Beta Was this translation helpful? Give feedback.
-
I completely agree. I think the dev server almost needs to be environment adaptive. Right now I have left enough room for you do anything in the event handler including using a miniflare instance to run the handler code. I haven't figure out all the entry points needed for an adaptive dev server and what use cases I want to serve. But you are right that right now its a node dev server only and might work in bun but the dev server is not adaptive. I am keen on hearing ideas about what kind of stuff you would need it to do as dev server in those mentioned environments |
Beta Was this translation helpful? Give feedback.
-
Our goal is using this within a GraalVM running a server like Spring Boot or Quarkus serving and handling the traffic for the whole system, dealing with all api endpoints, and then delegating some paths to the vinxi based server (solid start in our case) both in dev and production modes. We therefore have to route callbacks for file access and other typical services (i.e. that node would provide), back to the "native code" of the GraalVZM to handle. |
Beta Was this translation helpful? Give feedback.
-
So if I want to upgrade my Cloudflare deployed SolidStart Beta 1 app to Beta 2 I have to write my own Wrangler/dev-server integration? A Node.js dev-server will not work for me since I'm using KV/D1/etc. Any pointers on how I can get started on this? Update name = "test"
account_id = "<id>"
compatibility_date = "2023-12-01"
compatibility_flags = ["nodejs_compat"]
main = ".output/server/index.mjs"
[site]
bucket = ".output/public"
[build]
command = "pnpm build" and calling
✘ [ERROR] Could not resolve ".../.output/server/index.mjs"
.wrangler/tmp/bundle-9Y0pRc/middleware-insertion-facade.js:1:43:
1 │ ...PORTS from "/home/peter/Projects/playground/solidstart/2023q4/.o... References |
Beta Was this translation helpful? Give feedback.
-
I have an example working with miniflare in the Vinxi repo.. it's not a formalized integration but it works. It uses the older miniflare not the one based on workerd coz I need it to be able to communicate with the node runtime. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to figure out if there's a way to pass arguments to wrangler dev (e.g. --persist-to to change the path that wrangler stores the .wrangler folder). Is it still the case that you need to use miniflare? |
Beta Was this translation helpful? Give feedback.
-
Just got done catching up on Ryan's last stream and love what you're trying to do here with Vinxi!
💯, but curious if there's any reason Vinxi can't leave the server router/runtime decision to the end user as well? E.g. if the end user wants to use Hono, or Bun/Elysia, etc, rather than nitro/h3 eventHandler style approach to handling incoming server requests and streaming back the reac/solid/etc app.
Side note, was playing around with the examples and noticed the typings/intellisense (at least in vscode) isn't working in many cases. Adjusting the root tsconfig.json#moduleResolution to
bundler
enables support for package.json export fields and fixes the issues :).Beta Was this translation helpful? Give feedback.
All reactions