Wasp CLI now supports generating files based on configuration values in WASP. We use the awesome Go Templates as template engine. Let's take a wasp configuration file
// wasp.tmpl
{
"wasp": {
"host": "{{ .wasp.host }}"
}
}
You can now render the tmpl file using the wasp gen
command as
$ wasp put dev.golang.wasp.host "http://localhost:9000"
$ wasp gen dev.golang /path/to/wasp.tmpl > ~/.indix/wasp.json
$ cat /path/to/config.json
{
"wasp": {
"host": "http://localhost:9000"
}
}