pinokiod 2.15.52 → 2.15.53
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/package.json +1 -1
- package/server/index.js +13 -5
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -2140,14 +2140,22 @@ class Server {
|
|
|
2140
2140
|
origin: '*'
|
|
2141
2141
|
}));
|
|
2142
2142
|
|
|
2143
|
-
|
|
2143
|
+
if (this.kernel.homedir) {
|
|
2144
|
+
this.app.use(express.static(this.kernel.path("web/public")))
|
|
2145
|
+
}
|
|
2144
2146
|
this.app.use(express.static(path.resolve(__dirname, 'public')));
|
|
2145
2147
|
this.app.use("/web", express.static(path.resolve(__dirname, "..", "..", "web")))
|
|
2146
2148
|
this.app.set('view engine', 'ejs');
|
|
2147
|
-
this.
|
|
2148
|
-
this.
|
|
2149
|
-
|
|
2150
|
-
|
|
2149
|
+
if (this.kernel.homedir) {
|
|
2150
|
+
this.app.set("views", [
|
|
2151
|
+
this.kernel.path("web/views"),
|
|
2152
|
+
path.resolve(__dirname, "views")
|
|
2153
|
+
])
|
|
2154
|
+
} else {
|
|
2155
|
+
this.app.set("views", [
|
|
2156
|
+
path.resolve(__dirname, "views")
|
|
2157
|
+
])
|
|
2158
|
+
}
|
|
2151
2159
|
this.app.use(express.json());
|
|
2152
2160
|
this.app.use(express.urlencoded({ extended: true }));
|
|
2153
2161
|
this.app.use(cookieParser());
|