Giter Club home page Giter Club logo

Comments (6)

nksaraf avatar nksaraf commented on July 30, 2024 3

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.

from vinxi.

nksaraf avatar nksaraf commented on July 30, 2024

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.

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 h3 for the server runtime. h3 takes care of a lot of problems with runtime differences which is really valuable. you can build any pattern on top and different server APIs. So something like Hono's API can be easily emulated by h3 if thats desired. Supporting too many tools in a zone which doesn't really gain much by having opinions prevents deeper integration.

from vinxi.

apatrida avatar apatrida commented on July 30, 2024

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.

from vinxi.

nksaraf avatar nksaraf commented on July 30, 2024

The dev server is important for adapters as much as the production mode is.

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

from vinxi.

apatrida avatar apatrida commented on July 30, 2024

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.

from vinxi.

peterhirn avatar peterhirn commented on July 30, 2024

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
Using this wrangler.toml

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 pnpm wrangler dev seems to work somewhat except:

  • TailwindCSS is broken
  • Rebuilds always fail with the following error (refreshing the page afterwards works)
✘ [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...

from vinxi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.