Closed isaacabraham closed 5 years ago
Indeed this suggests that perhaps in a perfect world Saturn's application { }
abstraction could be a separate package to Saturn's routing capabilities (which are more closely coupled to Giraffe etc.).
I don't think I'd want to do separate package for application
- it seems that it would be really niche use case.
But we definitely can:
application
to support scenarios without routing.Saturn.Extensions.Grpc
pacakge to provide helpers discussed https://github.com/CompositionalIT/protobuf-net.Grpc/pull/1
This might be going "against" the core of Saturn, but if you want to use Saturn as a "lightweight" way to create ASP .NET Core applications, using only the
application { }
type and without routing, you can't - Saturn throws an error if you create an app without routes with the errorRouter needs to be defined in Saturn application
.It would be great to remove this error (perhaps replaced with a warning that could be suppressed with an explicit
no_routes
flag inside theapplication { }
?) for cases where there is no HTTP routing e.g. https://github.com/protobuf-net/protobuf-net.Grpc