Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Any interest in supporting a Vapor Provider? #12

Closed
cwoloszynski opened this issue Oct 25, 2016 · 3 comments
Closed

Any interest in supporting a Vapor Provider? #12

cwoloszynski opened this issue Oct 25, 2016 · 3 comments
Labels

Comments

@cwoloszynski
Copy link

I'm looking at this in the context of Vapor and it seems like this is a natural to be used as a Provider.

Have you considered this?

@matthijs2704
Copy link
Owner

I have considered this, only problem is that you need to be able to access the instance again, but it's not possible to add a custom variable to the droplet class, so it would be useless to create a provider at the moment. I am looking for other possibilities though

@cwoloszynski77
Copy link

Yes, you are right. I have learned yesterday (from a Slack conversation) that the right approach is to use a Middleware pattern to inject the reference into each request. Provider is not sufficient to do what I was looking to do. I have not yet developed a good solution to configuring the instance using the Vapor configuration tools. That might be just part of the Middleware wrapper I am writing.

You can close this ticket.

@matthijs2704
Copy link
Owner

Okay! Yeah Providers are mostly used to provide database drivers and middleware, not really a full plugin driver yet :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants