That’s, perhaps, a very good question to ask early in the project because eventually parts of the config will trickle down to many services and it will be quite tedious to make big changes to it. TypesafeConfig has served me well in some projects, but since I’ve switched to Cats-Effect, a much better match has become Pureconfig.

The rules are simple:

  1. You use HOCON, no surprises here for the ex-TSconfig users among us.
  2. There is a good list of supported out-of-the-box types: File, UUID, java.time._, etc…
  3. You define an ADT:
case class ResearchDriveConf(webdavUsername: String,
webdavPassword: String,
webdavBase: ResearchDrivePath,
maxFolderDepth: Short)

4. Which parses this config into…

About

Mike Kotsur

Mostly FP, software design, tech leadership + some other stuff. All ideas and thoughts are my own. Constructive discussions are welcome!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store