@increase21/simplenodejs 2.0.2 → 2.0.3
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 +2 -2
- package/package.json +12 -8
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ Controllers are auto-loaded from `controllersDir` at startup. The file path maps
|
|
|
98
98
|
```
|
|
99
99
|
controllers/
|
|
100
100
|
drivers/
|
|
101
|
-
auths.ts → /
|
|
101
|
+
auths.ts → /drivers/auths
|
|
102
102
|
|
|
103
103
|
customers/
|
|
104
104
|
auths.ts → /customers/auths
|
|
@@ -119,7 +119,7 @@ export default class AuthController {
|
|
|
119
119
|
// single HTTP method — access this.ctx directly, no descriptor needed
|
|
120
120
|
async login(): Promise<void> {
|
|
121
121
|
if (this.ctx.method !== "post") return this.ctx.res.status(405).json({ error: "Method Not Allowed" });
|
|
122
|
-
//
|
|
122
|
+
// other logic...
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
// multiple HTTP methods — return a SimpleJsEndpoint array
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@increase21/simplenodejs",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
|
+
"homepage": "https://github.com/increase21/simplenodejs#readme",
|
|
5
|
+
"funding": {
|
|
6
|
+
"type": "github",
|
|
7
|
+
"url": "https://github.com/sponsors/increase21"
|
|
8
|
+
},
|
|
4
9
|
"description": "Lightweight Node.js HTTP framework with middlewares and plugins",
|
|
5
|
-
"dev": "dist/index.js",
|
|
6
10
|
"bugs": "https://github.com/increase21/simplenodejs/issues",
|
|
7
11
|
"main": "dist/index.js",
|
|
8
12
|
"types": "dist/index.d.ts",
|
|
@@ -15,14 +19,13 @@
|
|
|
15
19
|
},
|
|
16
20
|
"repository": {
|
|
17
21
|
"type": "git",
|
|
18
|
-
"url": "https://github.com/increase21/simplenodejs.git"
|
|
19
|
-
"directory": ""
|
|
22
|
+
"url": "git+https://github.com/increase21/simplenodejs.git"
|
|
20
23
|
},
|
|
21
24
|
"files": [
|
|
22
25
|
"dist"
|
|
23
26
|
],
|
|
24
27
|
"scripts": {
|
|
25
|
-
"build": "tsc
|
|
28
|
+
"build": "tsc",
|
|
26
29
|
"test": "node dist/test.js",
|
|
27
30
|
"dev": "nodemon server.ts"
|
|
28
31
|
},
|
|
@@ -34,10 +37,11 @@
|
|
|
34
37
|
],
|
|
35
38
|
"author": "Increase Nkanta",
|
|
36
39
|
"license": "MIT",
|
|
37
|
-
"
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"typescript": "^5.3.0",
|
|
38
42
|
"@types/node": "^20.0.0"
|
|
39
43
|
},
|
|
40
|
-
"
|
|
41
|
-
"
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=20"
|
|
42
46
|
}
|
|
43
47
|
}
|