Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(server): configurable app option #5605

Closed
wants to merge 3 commits into from
Closed

feat(server): configurable app option #5605

wants to merge 3 commits into from

Conversation

@galvez
Copy link
Contributor

@galvez galvez commented Apr 26, 2019

@pi0 @Atinux @clarkdo @manniL @kevinmarrec @aldarund @alexchopin

Please see http://hire.jonasgalvez.com.br/2019/apr/26/revamping-nuxts-http-server

@galvez galvez changed the title Feat/server app option feat(server): configurable app option Apr 26, 2019
@clarkdo
Copy link
Member

@clarkdo clarkdo commented Apr 26, 2019

I think we need type definition for app to constraint its API like use, req and res or at least doc/comment to describe it, so that user won't make any mistake to use a customized server middleware.

And actually connect is a very pure middleware, it won't have much influence in performance except that it doesn't support async handler (which can be trickily implemented by calling next after await/in promise).
As customized server middleware may not be as efficiency as connect, maybe we should consider if it's necessary to open this door as it's similar to programmatical Nuxt usage.

If the customized server middleware is better than connect, we can just replace it with new one since app is very common (a server layer) and won't include special logic.

@galvez
Copy link
Contributor Author

@galvez galvez commented Apr 26, 2019

@clarkdo as per discussion in the #core channel, I'm withdrawing this in favor of pushing to a full replacement of connect soon.

@galvez galvez closed this Apr 26, 2019
@pi0 pi0 deleted the feat/server-app-option branch Apr 26, 2019
@douira
Copy link

@douira douira commented Aug 15, 2019

What does "soon" mean? When is this replacement of connect coming? Is it going to have to wait until nuxt 3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants