Add config.js, dockerfile

This commit is contained in:
wancat committed 2023-07-21 11:27:01 +08:00
1 parent 4ffdb5d627
commit 2dffd2f74d
5 files changed
+48 -4

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
function get(key, defaultValue) {
const value = process.env[key]
if (value != null) {
return value
}
return defaultValue
}
export default {
host: get('HOST', 'localhost'),
port: get('PORT', 3000),
db: get('MONGO_URL', 'mongodb://localhost:27017/odyssey-test'),
}