Skip to content

Usage in Server Side Swift with Vapor #23

Answered by mbrandonw
madsodgaard asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @madsodgaard, while we haven't specifically explored using the dependencies library in Vapor (though we plan on it soon), we do think it should work quite well. In general, server frameworks are a great example of “single entry point systems”, which this library excels at.

However, we have started using this dependencies library on our site, which doesn't use Vapor but we were able to model a database client dependency just fine. Rather than holding a connection to the database directly in dependencies, we hold a connection pool for the database. Would that help your situation?

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@madsodgaard
Comment options

@mbrandonw
Comment options

Answer selected by madsodgaard
Comment options

You must be logged in to vote
2 replies
@mbrandonw
Comment options

@nashysolutions
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants