I am new to Nuxt or any sort of node stuff.I m trying to create different environment for different cases, e.g. If I want to test my app, I want the block of dev object to run (pointing to dev endpoint) etc, following is a example
[
prod: {
server: www.mysite.com,
api: 'www.jsonplaceholder.com/'
},
dev: {
server: www.internal-mysite.com,
api: 'www.jsonplaceholder.com/'
}
]
so when I do npm run dev
, it run the app with those endpoints I know that .env
won't allowed objects or array so I cannot use that .I have tried dotenv
but not much help I can get out of it, I tried watching this but I cannot pass NODE_ENV=config.dev (given that config is a file containing the object) How can I make my app to work like that?
A detailed answered would be helpful.