Skip to content

Commit

Permalink
Update config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KhoiBao1 authored Jan 20, 2025
1 parent b60a1a8 commit efe0167
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ module.exports = {
port: 3000
},
database: {
connection: 'mongodb://localhost:27017/shopping',
connection: process.env.DB_URI || 'mongodb://localhost:27017/shopping', // Dùng biến môi trường để linh hoạt
option: {
useMongoClient: true,
useNewUrlParser: true,
useUnifiedTopology: true,
autoIndex: false
}
},
session: {
key: '27bda112-99dd-4496-8015-ea20d1034228'
key: process.env.SESSION_KEY || '27bda112-99dd-4496-8015-ea20d1034228'
}
};

0 comments on commit efe0167

Please sign in to comment.