daveappserver 0.5.53 → 0.5.54
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/appserver.js +14 -3
- package/package.json +1 -1
package/appserver.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var myVersion = "0.5.
|
|
1
|
+
var myVersion = "0.5.54", myProductName = "daveAppServer";
|
|
2
2
|
|
|
3
3
|
exports.start = startup;
|
|
4
4
|
exports.notifySocketSubscribers = notifySocketSubscribers;
|
|
@@ -1041,8 +1041,19 @@ function startup (options, callback) {
|
|
|
1041
1041
|
if (config.addMacroToPagetable !== undefined) {
|
|
1042
1042
|
config.addMacroToPagetable (pagetable, theRequest); //8/10/22 by DW
|
|
1043
1043
|
}
|
|
1044
|
-
|
|
1045
|
-
|
|
1044
|
+
|
|
1045
|
+
function replaceAllAndReturnHtml () {
|
|
1046
|
+
var pagetext = utils.multipleReplaceAll (templatetext.toString (), pagetable, false, "[%", "%]");
|
|
1047
|
+
returnHtml (pagetext);
|
|
1048
|
+
}
|
|
1049
|
+
if (config.asyncAddMacroToPagetable !== undefined) { //8/10/22 by DW
|
|
1050
|
+
config.asyncAddMacroToPagetable (pagetable, theRequest, function () {
|
|
1051
|
+
replaceAllAndReturnHtml ();
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
else {
|
|
1055
|
+
replaceAllAndReturnHtml ();
|
|
1056
|
+
}
|
|
1046
1057
|
}
|
|
1047
1058
|
if (config.pathServerHomePageSource !== undefined) {
|
|
1048
1059
|
fs.readFile (config.pathServerHomePageSource, function (err, templatetext) {
|