Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = function (env) {
- return require("configurenv")(
- [
- {
- type: 'config',
- env: 'SERVER',
- mapping: 'server',
- config: [
- {
- type: 'string',
- env: 'HOST',
- mapping: 'host',
- default: '127.0.0.1'
- },
- {
- type: 'int',
- env: 'PORT',
- mapping: 'port',
- default: 3000
- }
- ]
- },
- {
- type: 'config',
- env: 'DATABASE',
- mapping: 'database',
- config: [
- {
- type: 'enum',
- env: 'DRIVER',
- mapping: 'driver',
- values: ["pg", "mysql", "sqlite3"],
- default: "pg"
- },
- {
- type: 'config',
- env: 'CONNECTION',
- mapping: 'connection',
- config: [
- {
- type: 'string',
- env: 'HOST',
- mapping: 'host',
- default: '127.0.0.1'
- },
- {
- type: 'string',
- env: 'USERNAME',
- mapping: 'user',
- default: 'defaultusername'
- },
- {
- type: 'string',
- env: 'PASSWORD',
- mapping: 'password',
- default: 'defaultpassword'
- },
- {
- type: 'string',
- env: 'DATABASE',
- mapping: 'database',
- default: 'sympleesignin'
- },
- ]
- },
- ]
- },
- ],
- {
- namespace: "SYMPLEESIGNIN"
- }
- ).build(env).config
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement