menu
up-caret
down-caret

ZEIT

Our mission is to make cloud computing as easy and accessible as mobile computing. You can find our Next.js community here.

# Micro

Asynchronous HTTP microservices

Trending conversations
503 on deployment
@codelayer · 22d
BRU1 instances are timing out
@helguita · 31d
Images not showing on CRA deployment
@passingmagic · 4h
$ now --target doing nothing
@spy-seth · 13h
Deploying Node v6
@mkern · 34d

Using .env file to set enviroment varibles with micro and pm2 outside now

ZEIT/Micro · January 31, 2019 at 5:35pm

Using .env file to set enviroment varibles with micro and pm2 outside now

January 31, 2019 at 5:35pm

I'm used to use .env files for setting my secret keys and additional config for my different environments, with micro-dev, .env files works fine, but when i try to use same file with micro doest not work. I am missing something?


January 31, 2019 at 6:29pm

Can you give a reproduction code? It should work just fine...

  • reply
  • like

I solved this by adding it to my index file and reviewing the code in micro-dev. They do that in micro-dev/bin/micro-dev.js and in micro donenv it is not a dependency, so im not sure if this is the correct way to do this

  • reply
  • like
  • reply
  • like

February 11, 2019 at 2:36am

@rubenmeza, there's a better way. use secrets

  • reply
  • like