Introducing a new configuration package

Hey everyone,

A few days ago we released Encore 1.9.0 which adds a new config package.

It combines the power of CUE lang with the smooth Encore developer experience. It gives you both the type safety of Go, and the powerful flexibility of CUE. This lets you focus on writing your business logic, safe in the knowledge that Encore’s compiler will prevent invalid configurations from ever reaching your production environment.

To use it, you simply call config.Load[*MyConfigType]() and assign the returned instance of your config type to a package-level variable (Remember to first update with encore version update.)

As with many of Encore’s features, config comes with isolated test support. This allows you to override configuration values on inside tests, without impacting any other concurrently running tests.

For more information about Encore’s new native config support, check out the docs.