Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. # cfgByEnv(config)
  2.  
  3. Your good configuration variable.
  4.  
  5. Example:
  6. ```js
  7. // process.env.PORT => 80
  8. // process.env.MONGODB_URI => mongodb://localhost:53017/my-awesome-db
  9.  
  10. cfgByEnv({
  11. port: 3080,
  12. host: '::',
  13. mongodb: {
  14. uri: 'mongodb://localhost:27017/test',
  15. },
  16. });
  17.  
  18. // newConfig => {
  19. // port: 80,
  20. // host: '::',
  21. // mongodb: {
  22. // uri: 'mongodb://localhost:53017/my-awesome-db',
  23. // },
  24. // }
  25. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement