Where should be .env file in Ktor project

187 views Asked by At

In Spring, for using different configs, you need to specify the active profile. And the application selects the respective file for selecting config. How to implement such a thing in Ktor? I have application.conf file, and set connectionString: ${CONNECTION_STRING} and in .env file I specified the value for the variable CONNECTION_STRING. But, application does not run saying Could not resolve substitution to a value: ${CONNECTION_STRING}.

application.conf is in resources folder. .env is in root folder, beside src folder.

0

There are 0 answers