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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server/index.js +13 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "2.15.52",
3
+ "version": "2.15.53",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -2140,14 +2140,22 @@ class Server {
2140
2140
  origin: '*'
2141
2141
  }));
2142
2142
 
2143
- this.app.use(express.static(this.kernel.path("web/public")))
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.app.set("views", [
2148
- this.kernel.path("web/views"),
2149
- path.resolve(__dirname, "views")
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());