@live-change/cli 0.5.24 → 0.6.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.
Files changed (2) hide show
  1. package/bin/lcli.js +17 -2
  2. package/package.json +7 -7
package/bin/lcli.js CHANGED
@@ -18,7 +18,8 @@ const {
18
18
  setupApiWs,
19
19
  setupDbServer,
20
20
  setupDbClient,
21
- setupApp
21
+ setupApp,
22
+ setupApiEndpoints
22
23
 
23
24
  } = require("@live-change/server")
24
25
 
@@ -212,6 +213,8 @@ async function apiServer(argv) {
212
213
 
213
214
  const expressApp = express()
214
215
 
216
+ await setupApiEndpoints(expressApp, apiServer)
217
+
215
218
  const httpServer = http.createServer(expressApp)
216
219
 
217
220
  setupApiWs(httpServer, apiServer)
@@ -220,6 +223,7 @@ async function apiServer(argv) {
220
223
  httpServer.listen(apiPort, apiHost)
221
224
  console.log('Listening on port ' + apiPort)
222
225
  }
226
+
223
227
  async function ssrServer(argv, dev) {
224
228
  const { ssrRoot, ssrPort, ssrHost, apiHost, apiPort } = argv
225
229
 
@@ -257,6 +261,12 @@ async function ssrServer(argv, dev) {
257
261
  apiServer = await setupApiServer({ ...argv, fastAuth })
258
262
  }
259
263
 
264
+ if(argv.withApi) {
265
+ await setupApiEndpoints(expressApp, apiServer)
266
+ }
267
+
268
+ console.log("ENDPOINTS INSTALLED! CREATING SSR SERVER!")
269
+
260
270
  const ssrServer = new SsrServer(expressApp, manifest, {
261
271
  ...argv,
262
272
  dev,
@@ -273,14 +283,19 @@ async function ssrServer(argv, dev) {
273
283
  }
274
284
  )
275
285
  })
276
-
277
286
  await ssrServer.start()
278
287
 
288
+ console.log("SSR INSTALLED! CREATING HTTP SERVER!")
289
+
279
290
  const httpServer = http.createServer(expressApp)
280
291
  if(argv.withApi) {
281
292
  setupApiWs(httpServer, apiServer)
282
293
  setupApiSockJs(httpServer, apiServer)
283
294
  }
284
295
 
296
+ console.log("HTTP SERVER CREATED! INSTALLING!")
297
+
285
298
  httpServer.listen(ssrPort, ssrHost)
299
+
300
+ console.log("LISTENING ON ",`${ssrHost}:${ssrPort} link: http://${ssrHost}:${ssrPort}/`)
286
301
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/cli",
3
- "version": "0.5.24",
3
+ "version": "0.6.0",
4
4
  "description": "Live Change Framework - command line interface",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -24,13 +24,13 @@
24
24
  },
25
25
  "homepage": "https://github.com/live-change/live-change-framework",
26
26
  "dependencies": {
27
- "@live-change/dao": "0.4.2",
27
+ "@live-change/dao": "0.4.3",
28
28
  "@live-change/dao-sockjs": "^0.2.1",
29
- "@live-change/dao-websocket": "0.4.1",
29
+ "@live-change/dao-websocket": "0.4.2",
30
30
  "@live-change/db-server": "0.5.4",
31
- "@live-change/framework": "^0.5.24",
32
- "@live-change/server": "^0.5.24",
33
- "@live-change/vue3-ssr": "0.2.2",
31
+ "@live-change/framework": "^0.6.0",
32
+ "@live-change/server": "^0.6.0",
33
+ "@live-change/vue3-ssr": "0.2.5",
34
34
  "dotenv": "^10.0.0",
35
35
  "express": "^4.17.1",
36
36
  "http-proxy-middleware": "2.0.1",
@@ -41,5 +41,5 @@
41
41
  "websocket": "^1.0.34",
42
42
  "yargs": "^17.3.0"
43
43
  },
44
- "gitHead": "2fb6050c59e88d0dd285d640e454819d30130b0b"
44
+ "gitHead": "5e4250b3a6fcf11e46f36e6b9713c2a9f4a4dc92"
45
45
  }