Refactor: Use @simpleworkjs/conf for configuration
- Replace ENV vars with proper config system - Add conf/ directory with base, development, production, secrets - Add secrets.example.js template - Update .gitignore for secrets.js - Show environment in startup banner
This commit is contained in:
36
conf/base.js
Normal file
36
conf/base.js
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Base configuration - shared across all environments
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
server: {
|
||||
port: 3000,
|
||||
host: '0.0.0.0'
|
||||
},
|
||||
|
||||
gateway: {
|
||||
url: 'http://127.0.0.1:18789',
|
||||
token: 'a41984619a5f4b9bf9148ab6eb4abca53eb796d046cbbec5'
|
||||
},
|
||||
|
||||
session: {
|
||||
secret: 'change-me-in-production',
|
||||
maxAge: 24 * 60 * 60 * 1000 // 24 hours
|
||||
},
|
||||
|
||||
auth: {
|
||||
disabled: false,
|
||||
ldap: {
|
||||
enabled: false,
|
||||
url: 'ldap://localhost:389',
|
||||
baseDN: 'ou=users,dc=example,dc=com',
|
||||
bindDN: '',
|
||||
bindPassword: '',
|
||||
searchFilter: '(uid={{username}})'
|
||||
}
|
||||
},
|
||||
|
||||
data: {
|
||||
dir: './data'
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user