Skip to content

Thoughts on shaku_rocket service configuration and hand off to rocket #14

Answered by AzureMarker
n0mn0m asked this question in Q&A
Discussion options

You must be logged in to vote

Building up the services and module can totally be separate from Rocket's initialization. Your gist highlights that pretty well, and I especially like how it includes a test for the endpoint.

You found some info on submodules, which is how shaku handles organization and abstraction of groups of services. There's a submodules getting started guide that should be helpful: https://docs.rs/shaku/0.5.0/shaku/guide/submodules/index.html

If you want to look at a (medium-large) project which uses shaku_rocket, check out https://github.com/Mcat12/pihole-api/. The shaku module is located at https://github.com/Mcat12/pihole-api/blob/master/src/services/mod.rs.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

@AzureMarker
Comment options

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