The error raised is Exception in thread "main" com.typesafe.config.ConfigException$NotResolved: port has not been resolved, you need to call Config#resolve(), see API docs for Config#resolve()
But nowhere in the code does resolve() get called so I think substitution is just not going to work at all.
The typesafe docs recommend using ConfigFactory.load() because it will call resolve for you whereas we’re only doing a parse. I’ll try to submit a PR if it works.