fix: add baseUrl in passport oauth

This commit is contained in:
Lin, Hung-Shin committed 2023-10-11 14:46:07 +08:00
1 parent a69f4960b2
commit 33582a4827
6 files changed
+10 -3

No files matched your search

+5 -1
View File
@@ -1,6 +1,6 @@
import { get } from './utils/env.js'
export default {
const config = {
host: get('HOST', 'localhost'),
port: get('PORT', 3000),
db: get('MONGO_URL', 'mongodb://localhost:27017/odyssey-test'),
@@ -15,3 +15,7 @@ export default {
clientSecret: get('GOOGLE_CLIENT_SECRET', ''),
},
}
config.baseUrl = get('BASE_URL', `http://${config.host}:${config.port}`)
export default config