Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. module.exports = function (env) {
  2. return require("configurenv")(
  3. [
  4. {
  5. type: 'config',
  6. env: 'SERVER',
  7. mapping: 'server',
  8. config: [
  9. {
  10. type: 'string',
  11. env: 'HOST',
  12. mapping: 'host',
  13. default: '127.0.0.1'
  14. },
  15. {
  16. type: 'int',
  17. env: 'PORT',
  18. mapping: 'port',
  19. default: 3000
  20. }
  21. ]
  22.  
  23. },
  24. {
  25. type: 'config',
  26. env: 'DATABASE',
  27. mapping: 'database',
  28. config: [
  29. {
  30. type: 'enum',
  31. env: 'DRIVER',
  32. mapping: 'driver',
  33. values: ["pg", "mysql", "sqlite3"],
  34. default: "pg"
  35. },
  36. {
  37. type: 'config',
  38. env: 'CONNECTION',
  39. mapping: 'connection',
  40. config: [
  41. {
  42. type: 'string',
  43. env: 'HOST',
  44. mapping: 'host',
  45. default: '127.0.0.1'
  46. },
  47. {
  48. type: 'string',
  49. env: 'USERNAME',
  50. mapping: 'user',
  51. default: 'defaultusername'
  52. },
  53. {
  54. type: 'string',
  55. env: 'PASSWORD',
  56. mapping: 'password',
  57. default: 'defaultpassword'
  58. },
  59. {
  60. type: 'string',
  61. env: 'DATABASE',
  62. mapping: 'database',
  63. default: 'sympleesignin'
  64. },
  65. ]
  66. },
  67. ]
  68.  
  69. },
  70. ],
  71. {
  72. namespace: "SYMPLEESIGNIN"
  73. }
  74. ).build(env).config
  75.  
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement