princejs 1.3.1 → 1.3.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.
- package/Readme.md +25 -15
- package/package.json +1 -1
package/Readme.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# PrinceJS
|
|
2
2
|
|
|
3
|
-
**The fastest backend framework ever made.**
|
|
4
|
-
**Beats Hono and Express • Built in 3 days**
|
|
3
|
+
**The fastest backend framework ever made.**
|
|
4
|
+
**Beats Hono and Express • Built in 3 days** \
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@ npm install princejs
|
|
|
17
17
|
|
|
18
18
|
### Quick Start
|
|
19
19
|
|
|
20
|
-
```
|
|
20
|
+
```ts
|
|
21
21
|
import { Prince } from 'princejs';
|
|
22
22
|
|
|
23
23
|
const app = new Prince();
|
|
@@ -45,39 +45,49 @@ app.post('/pay', async (req) => {
|
|
|
45
45
|
app.listen(3000);
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Features
|
|
49
51
|
|
|
50
|
-
All HTTP methods
|
|
52
|
+
All HTTP methods: **GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD**
|
|
51
53
|
|
|
52
54
|
```bash
|
|
53
55
|
app.json(data, status?) — clean JSON with status
|
|
54
56
|
app.error(handler) — global error handling
|
|
55
57
|
```
|
|
56
58
|
|
|
59
|
+
---
|
|
57
60
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Hono: 20k–40k requests in 10s
|
|
62
|
-
Express: ~7k requests in 10s
|
|
63
|
-
```
|
|
61
|
+
## 🔥 Benchmark Comparison (real Windows laptop)
|
|
62
|
+
|
|
63
|
+
Real-world 30-second load test with `autocannon -c 100 -d 30`.
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
### **Framework Performance Table**
|
|
66
|
+
|
|
67
|
+
| Framework | Avg Req/sec | Total Requests (30s) | Avg Bytes/sec | Avg Latency |
|
|
68
|
+
| -------------------- | ------------ | -------------------- | ------------- | ------------ |
|
|
69
|
+
| **PrinceJS (yours)** | **8,526.34** | **256,000** | **1.14 MB/s** | **11.22 ms** |
|
|
70
|
+
| Hono | 8,044.8 | 241,000 | 1.08 MB/s | 11.22 ms |
|
|
71
|
+
| Elysia | 9,531.21 | 286,000 | 1.28 MB/s | 10 ms |
|
|
72
|
+
|
|
73
|
+
---
|
|
66
74
|
|
|
67
75
|
### Author
|
|
76
|
+
|
|
68
77
|
Matthew Micheal — Nigeria
|
|
69
78
|
|
|
70
79
|
Made in PowerShell on a school laptop.
|
|
71
80
|
|
|
72
81
|
### Links
|
|
73
82
|
|
|
74
|
-
npm: https://www.npmjs.com/package/princejs
|
|
83
|
+
npm: [https://www.npmjs.com/package/princejs](https://www.npmjs.com/package/princejs)
|
|
75
84
|
|
|
76
|
-
|
|
85
|
+
github: [https://github.com/MatthewTheCoder1218/princejs](https://github.com/MatthewTheCoder1218/princejs)
|
|
77
86
|
|
|
87
|
+
---
|
|
78
88
|
|
|
79
89
|
PrinceJS — Small. Fast. Unbeatable.
|
|
80
90
|
|
|
81
91
|
```bash
|
|
82
92
|
pnpm add princejs
|
|
83
|
-
```
|
|
93
|
+
```
|