Tuttifrutti is a framework/helper-collection/kitchen-sink library to quickly bootstrap new (micro)services at KSF Media.
Add it to the packages
key in your stack.yaml
:
- location:
git: https://github.com/KSF-Media/tuttifrutti
commit: c5dd447 # Or latest commit, or release, or `master`, etc.
extra-dep: true
- Prelude: use
NoImplicitPrelude
, and importTuttifrutti.Prelude
- Health endpoint: Kubernetes needs an
/healthz
endpoint,Tuttifrutti.Servant.Health
containsApi
andserver
for it - Redirect endpoint: in
Tuttifrutti.Servant.Redirect
you can findApi
andredirect
handler - Logging:
Tuttifrutti.Log
(andTuttifrutti.Log.Handle
) has all the stuff that we need to logout onstdout
influentd
/Stackdriver format with different severities - Http:
Tuttifrutti.Http
(andTuttifrutti.Http.Handle
) has a fancy Http client integrated withXRequestId
,Data.Vcr
, etc. - Time:
Tuttifrutti.Time
(andTuttifrutti.Time.Handle
) has helpers to manage the application time, and possibly freeze it in different ways (e.g. for VCR tests)