@nattyjs/express 0.0.1-beta.56 → 0.0.1-beta.57

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/dist/index.cjs CHANGED
@@ -168,13 +168,13 @@ const ExpressModule = {
168
168
  if (config.cors)
169
169
  app.use(cors__default(config.cors));
170
170
  app.use(express__default.json({ limit: config.payload?.limit || "1mb" }));
171
- if (staticCfg?.dir && staticCfg.enabled) {
172
- const staticDir = path__default.resolve(staticCfg.dir);
171
+ if (staticCfg.enabled) {
172
+ const staticDir = path__default.resolve("public");
173
173
  app.use(staticPrettyRoutes({ staticDir, apiPrefix }));
174
174
  app.use(
175
175
  express__default.static(staticDir, {
176
176
  index: false,
177
- maxAge: staticCfg.maxAge ?? "1d"
177
+ maxAge: "1d"
178
178
  })
179
179
  );
180
180
  if (staticCfg.spaFallback !== false) {
package/dist/index.mjs CHANGED
@@ -158,13 +158,13 @@ const ExpressModule = {
158
158
  if (config.cors)
159
159
  app.use(cors(config.cors));
160
160
  app.use(express.json({ limit: config.payload?.limit || "1mb" }));
161
- if (staticCfg?.dir && staticCfg.enabled) {
162
- const staticDir = path.resolve(staticCfg.dir);
161
+ if (staticCfg.enabled) {
162
+ const staticDir = path.resolve("public");
163
163
  app.use(staticPrettyRoutes({ staticDir, apiPrefix }));
164
164
  app.use(
165
165
  express.static(staticDir, {
166
166
  index: false,
167
- maxAge: staticCfg.maxAge ?? "1d"
167
+ maxAge: "1d"
168
168
  })
169
169
  );
170
170
  if (staticCfg.spaFallback !== false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nattyjs/express",
3
- "version": "0.0.1-beta.56",
3
+ "version": "0.0.1-beta.57",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "ajayojha <ojhaajay@outlook.com>",
@@ -19,9 +19,9 @@
19
19
  "chokidar": "4.0.3",
20
20
  "cors": "2.8.5",
21
21
  "compression": "1.7.4",
22
- "@nattyjs/core": "0.0.1-beta.56",
23
- "@nattyjs/common": "0.0.1-beta.56",
24
- "@nattyjs/types": "0.0.1-beta.56"
22
+ "@nattyjs/core": "0.0.1-beta.57",
23
+ "@nattyjs/common": "0.0.1-beta.57",
24
+ "@nattyjs/types": "0.0.1-beta.57"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "20.3.1",