princejs 1.8.0 → 1.8.2

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/Readme.md +5 -1
  2. package/package.json +1 -1
package/Readme.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # 👑 **PrinceJS**
2
2
 
3
+ ![PrinceJS Image](./src/images/og.png)
4
+
3
5
  ### ⚡ Ultra-clean, modern & minimal Bun web framework built by a 13 year old. Among the top three in performance.
4
6
 
5
7
  ![npm](https://img.shields.io/npm/v/princejs)
@@ -96,7 +98,7 @@ app
96
98
 
97
99
  ```ts
98
100
  import { prince } from "princejs";
99
- import { cors, logger, rateLimit, auth, apiKey, jwt, session, compress } from "princejs/middleware";
101
+ import { cors, logger, rateLimit, auth, apiKey, jwt, session, compress, serve } from "princejs/middleware";
100
102
  import { validate } from "princejs/validation";
101
103
  import { cache, upload, sse } from "princejs/helpers";
102
104
  import { cron } from "princejs/scheduler";
@@ -110,6 +112,8 @@ app.use(cors());
110
112
  app.use(logger());
111
113
  app.use(rateLimit({ max: 100, window: 60 }));
112
114
 
115
+ app.use(serve({ root: "./public" }));
116
+
113
117
  app.use(validate(z.object({ name: z.string() })));
114
118
 
115
119
  app.use(jwt(key));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "princejs",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "An easy and fast backend framework that is among the top three — by a 13yo developer, for developers.",
5
5
  "main": "dist/prince.js",
6
6
  "types": "dist/prince.d.ts",