@rpcbase/server 0.38.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/database.js +4 -2
- package/express/index.js +1 -1
- package/package.json +3 -3
package/database.js
CHANGED
|
@@ -18,10 +18,12 @@ const replicaset_str = [0, 1, 2].map((i) => `database${i}:${process.env["DATABAS
|
|
|
18
18
|
console.log("db connection str:", replicaset_str)
|
|
19
19
|
|
|
20
20
|
const mongo_url = `mongodb://${replicaset_str}/${DATABASE_NAME}?`
|
|
21
|
-
+ `replicaSet=rs0
|
|
21
|
+
+ `replicaSet=rs0`
|
|
22
|
+
|
|
23
|
+
// &readPreference=secondary
|
|
22
24
|
|
|
23
25
|
module.exports = async() => {
|
|
24
|
-
console.log("
|
|
26
|
+
console.log("MONGO_URL", mongo_url)
|
|
25
27
|
const ret = await mongoose.connect(mongo_url)
|
|
26
28
|
// console.log("waiting after return", ret)
|
|
27
29
|
// TODO: handle connection retry and pools
|
package/express/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpcbase/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"license": "SSPL-1.0",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"body-parser": "1.19.2",
|
|
14
|
-
"connect-redis": "6.1.
|
|
14
|
+
"connect-redis": "6.1.2",
|
|
15
15
|
"cors": "2.8.5",
|
|
16
16
|
"debug": "4.3.3",
|
|
17
17
|
"dotenv": "16.0.0",
|
|
18
18
|
"express": "4.17.3",
|
|
19
19
|
"express-session": "1.17.2",
|
|
20
20
|
"glob": "7.2.0",
|
|
21
|
-
"mongoose": "6.2.
|
|
21
|
+
"mongoose": "6.2.6",
|
|
22
22
|
"redis": "4.0.4",
|
|
23
23
|
"validator": "13.7.0",
|
|
24
24
|
"yargs": "17.3.1"
|