Fork me on GitHub

can anyone recommend a good approach for different boundary extend-protocol implementations for dev vs prod? I'd like to use one type of datastore in dev vs a different one in prod. github search reveals something like and -- but would prefer not to include all impl in a single file. even better if the dev impl doesn't get included in prod build


I toyed around with putting the dev impl in dev/src/* and (load)'ing in dev/src/dev.clj but that way seems to break (reset)


Ensure dev/src is a specified source-path in project.clj for the dev profile; then you could have the appropriate namespace under dev/src. In that namespace have an integrant init-key defmethod (`ig/init-key ..`) to construct your dev-implementation. In the development config map (`dev.edn`, believe it is under dev/resources/dev.edn), add the appropriate key-value pair that you would normally use in the config.edn. Unless your duct configuration is different from the current template, dev.edn will be merged into config.edn, which means your dev-implementation should be swapped into the system.


That’s one way of doing it.

🎉 4

thanks, I'll try that