Middleware #218
clayrisser
started this conversation in
General
Middleware
#218
Replies: 3 comments
|
Quick reply: In your const myServerPlugin = () => ({
name: 'configure-server',
configureServer(server) {
// do something to the server
},
})
export default defineConfig({
plugins: [
one(/* ... */),
myServerPlugin(),
],
})But I can think of a few issues that may make this unusable for your case:
I think we should take a deeper look soon, maybe tomorrow. |
0 replies
|
h3 is removed now so it's all Vite. We do need a generic way for people to hook into the server in both dev and prod. Vite doesn't provide this so maybe we should work with them a bit, but some basic middleware support would be nice. Ideally we can make it typed (Tanstack does good stuff here). |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I need to setup a websocket server, and I need access to the server instance to create it.
https://github.com/enisdenjo/graphql-ws
For example...
How can I access the
onestackServerInstance?All reactions