@live-change/server 0.7.38 → 0.7.39

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.
@@ -4,9 +4,12 @@ async function setupApiEndpoints(expressApp, apiServer) {
4
4
  for(const serviceDefinition of apiServer.services.serviceDefinitions) {
5
5
  const { name, endpoints } = serviceDefinition
6
6
  for(const endpoint of endpoints) {
7
- const path = endpoint.name ? `/api/${name}/${endpoint.name}` : `/${name}`
8
- const express = await endpoint.create()
9
- expressApp.use(path, express)
7
+ let paths = endpoint.path ?? (endpoint.name ? `/api/${name}/${endpoint.name}` : `/${name}`)
8
+ if(!Array.isArray(paths)) paths = [paths]
9
+ const handler = await endpoint.create()
10
+ for(const path of paths) {
11
+ expressApp.use(path, handler)
12
+ }
10
13
  }
11
14
  }
12
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/server",
3
- "version": "0.7.38",
3
+ "version": "0.7.39",
4
4
  "description": "Live Change Framework - server",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -24,9 +24,9 @@
24
24
  "@live-change/dao": "0.5.22",
25
25
  "@live-change/dao-sockjs": "0.5.22",
26
26
  "@live-change/db-server": "0.6.23",
27
- "@live-change/framework": "^0.7.38",
27
+ "@live-change/framework": "^0.7.39",
28
28
  "@live-change/sockjs": "0.4.1",
29
- "@live-change/uid": "^0.7.38",
29
+ "@live-change/uid": "^0.7.39",
30
30
  "dotenv": "^16.0.3",
31
31
  "express": "^4.18.2",
32
32
  "express-static-gzip": "2.1.7",
@@ -38,5 +38,5 @@
38
38
  "websocket": "^1.0.34",
39
39
  "yargs": "^17.5.1"
40
40
  },
41
- "gitHead": "9636ce5e683e6eb467e1af75e84a238baaeee6de"
41
+ "gitHead": "9e9cd47f2fb1c3c82b20fdddbc5505c99e1e1c68"
42
42
  }