@rpcbase/server 0.162.0 → 0.164.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 CHANGED
@@ -24,7 +24,7 @@ if (typeof DATABASE_NAME !== "string") {
24
24
  throw new Error("expected DATABASE_NAME to be a string")
25
25
  }
26
26
 
27
- const hostname = CONTAINER_MODE === "native" ? "localhost" : "database"
27
+ const hostname = CONTAINER_MODE === "native" ? "127.0.0.1" : "database"
28
28
 
29
29
  const mongo_url = `mongodb://${hostname}:${DATABASE_PORT}/${DATABASE_NAME}?directConnection=true&replicaSet=rs0`
30
30
 
package/express/index.js CHANGED
@@ -51,14 +51,14 @@ module.exports = () => {
51
51
  ] :
52
52
  // local dev origins
53
53
  [
54
- `http://localhost:${CLIENT_PORT}`,
54
+ `http://127.0.0.1:${CLIENT_PORT}`,
55
55
  // `http://192.168.1.83:${CLIENT_PORT}`,
56
56
  // `http://192.168.1.140:${CLIENT_PORT}`,
57
57
  `http://admin.localhost:${CLIENT_PORT}`,
58
58
  // TODO: WARNING: TMP hardcoded port
59
- "http://localhost:8090", // TMP: used by inspected app from admin
60
- "http://localhost:8091", // TMP: used by inspected app from admin
61
- "http://localhost:9292", // TMP
59
+ "http://127.0.0.1:8090", // TMP: used by inspected app from admin
60
+ "http://127.0.0.1:8091", // TMP: used by inspected app from admin
61
+ "http://127.0.0.1:9292", // TMP
62
62
  ]
63
63
 
64
64
  if (APP_DOMAIN) {
@@ -19,7 +19,7 @@ if (typeof SESSION_STORE_PORT === "string" && !validator.isPort(SESSION_STORE_PO
19
19
  throw new Error("expected SESSION_STORE_PORT to be a valid port number")
20
20
  }
21
21
 
22
- const hostname = CONTAINER_MODE === "native" ? "localhost" : "session-store"
22
+ const hostname = CONTAINER_MODE === "native" ? "127.0.0.1" : "session-store"
23
23
 
24
24
  console.log("session-store hostname", hostname, "port", SESSION_STORE_PORT)
25
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.162.0",
3
+ "version": "0.164.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
6
  "bin": {
package/queue/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  const Queue = require("bull")
3
3
 
4
4
  const {WORKER_QUEUE_PORT, CONTAINER_MODE} = process.env
5
- const hostname = CONTAINER_MODE === "native" ? "localhost" : "worker-queue"
5
+ const hostname = CONTAINER_MODE === "native" ? "127.0.0.1" : "worker-queue"
6
6
  const worker_queue_url = `redis://${hostname}:${WORKER_QUEUE_PORT}`
7
7
 
8
8
  const tasks_list = Object.create(null)