@boomerang-io/webapp-spa-server 1.3.6 → 1.3.7
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/index.js +4 -6
- package/package.json +1 -3
package/index.js
CHANGED
|
@@ -5,12 +5,10 @@ const path = require("path");
|
|
|
5
5
|
const fs = require("fs");
|
|
6
6
|
const cors = require("cors");
|
|
7
7
|
const serialize = require("serialize-javascript");
|
|
8
|
-
const boomerangLogger = require("@boomerang-io/logger-middleware")("webapp-spa-server/index.js");
|
|
9
8
|
const health = require("@cloudnative/health-connect");
|
|
10
9
|
const defaultHtmlHeadInjectDataKeys = require("./config").defaultHtmlHeadInjectDataKeys;
|
|
11
10
|
|
|
12
11
|
// Get logger function
|
|
13
|
-
const logger = boomerangLogger.logger;
|
|
14
12
|
|
|
15
13
|
/**
|
|
16
14
|
* Begin exported module
|
|
@@ -123,9 +121,9 @@ function createBoomerangServer({
|
|
|
123
121
|
|
|
124
122
|
// Start server on the specified port and binding host
|
|
125
123
|
app.listen(PORT, "0.0.0.0", function () {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
console.log("server starting on", PORT);
|
|
125
|
+
console.log(`serving on root context: ${APP_ROOT}`);
|
|
126
|
+
console.log(`View app: http://localhost:${PORT}${APP_ROOT}`);
|
|
129
127
|
});
|
|
130
128
|
|
|
131
129
|
// Return server if needed to be used in an app
|
|
@@ -166,7 +164,7 @@ function injectEnvDataAndScriptsIntoHTML({ res, buildDir, appRoot, injectedDataK
|
|
|
166
164
|
.on("end", () => {
|
|
167
165
|
res.end();
|
|
168
166
|
})
|
|
169
|
-
.on("error", (e) =>
|
|
167
|
+
.on("error", (e) => console.log(e))
|
|
170
168
|
.on("data", (chunk) => res.write(addHeadData(chunk)));
|
|
171
169
|
|
|
172
170
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boomerang-io/webapp-spa-server",
|
|
3
3
|
"description": "Webapp Server for React-based SPA w/ client-side routing",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.7",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Tim Bula",
|
|
7
7
|
"email": "timrbula@gmail.com"
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"start": "node tester.js"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@boomerang-io/logger-middleware": "1.0.1-beta.5",
|
|
29
28
|
"@cloudnative/health-connect": "^2.1.0",
|
|
30
29
|
"body-parser": "^1.20.4",
|
|
31
30
|
"compression": "^1.8.1",
|
|
@@ -42,7 +41,6 @@
|
|
|
42
41
|
},
|
|
43
42
|
"pnpm": {
|
|
44
43
|
"overrides": {
|
|
45
|
-
"flatted": "^3.4.2",
|
|
46
44
|
"qs": "^6.15.0"
|
|
47
45
|
}
|
|
48
46
|
},
|