I have a micronaut based backend. I develop locally with other db properties than our production setup. I want to have two configurations. One for local development and one for production.
I tried to add a application-prod.yml:
micronaut:
application:
name: backend
server:
cors:
enabled: true
db:
addContactPoint: janusgraph
port: 8182
and a application-dev.yml
micronaut:
application:
name: backend
server:
cors:
enabled: true
db:
port: 8182
afterwards I added two properties to my class:
@Value("${db.port}")
protected int port;
@Value("${db.addContactPoint}")
protected String addContactPoint;
And then I tried to run it with:
MICRONAUT_ENVIRONMENTS=dev .\gradlew.bat run -t
But powershell said that there is no Cmdlet and so on...
How I can achieve to run my backend in dev mode locally or in prod mode in the production environment?
I tried to use the documentation. But things got not clear for me.
bg
Sebastian