@rpcbase/server 0.38.0 → 0.39.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/cli/run_docker.js CHANGED
@@ -16,8 +16,8 @@ const run_docker = async(infrastructure_dir, proj_prefix) => {
16
16
 
17
17
  const opts = ["--build", "--remove-orphans"]
18
18
  if (!is_production) opts.push("--abort-on-container-exit")
19
-
20
- const cmd = `docker-compose --env-file ${env_path} -p ${proj_prefix} ${compose_files.join(" ")} up ${opts.join(" ")}`
19
+ throw "shit"
20
+ const cmd = `docker-compose --quiet --env-file ${env_path} -p ${proj_prefix} ${compose_files.join(" ")} up ${opts.join(" ")}`
21
21
 
22
22
  console.log(cmd)
23
23
  try {
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&readPreference=secondary`
21
+ + `replicaSet=rs0`
22
+
23
+ // &readPreference=secondary
22
24
 
23
25
  module.exports = async() => {
24
- console.log("mongo_url", mongo_url)
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
@@ -11,7 +11,7 @@ const {APP_DOMAIN, CLIENT_PORT} = process.env
11
11
 
12
12
  module.exports = () => {
13
13
  const app = express()
14
- app.use(body_parser.json())
14
+ app.use(body_parser.json({limit: "2mb"}))
15
15
 
16
16
  app.set("trust proxy", 1)
17
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.38.0",
3
+ "version": "0.39.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.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.4",
21
+ "mongoose": "6.2.6",
22
22
  "redis": "4.0.4",
23
23
  "validator": "13.7.0",
24
24
  "yargs": "17.3.1"