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:
22
conf/production.js
Normal file
22
conf/production.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Production environment configuration
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
server: {
|
||||
// Use PORT env var if set, otherwise default
|
||||
port: parseInt(process.env.PORT) || 3000
|
||||
},
|
||||
|
||||
session: {
|
||||
// Should be set via secrets.js in production
|
||||
secret: process.env.SESSION_SECRET || 'CHANGE-ME-NOW'
|
||||
},
|
||||
|
||||
auth: {
|
||||
disabled: false,
|
||||
ldap: {
|
||||
enabled: process.env.LDAP_ENABLED === 'true'
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user