@galeh/chuka 1.0.9 → 1.0.11
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 +31 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
#
|
|
2
|
-
This package fortifies Express.js, empowering it with strong types, dependency injection, profound validation, and a streamlined approach to simplify API programming.
|
|
1
|
+
# @galeh/chuka
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
🚀 **Introducing @galeh/chuka - Empowering Express.js for Effortless API Development!**
|
|
5
4
|
|
|
5
|
+
@galeh/chuka is a powerful package designed to enhance your Express.js experience, making API development faster, stronger, and more straightforward. 🌐✨
|
|
6
|
+
|
|
7
|
+
## Key Features
|
|
8
|
+
|
|
9
|
+
- ✅ **Strong Types:** Say goodbye to runtime errors with strong typing for a more robust development experience.
|
|
10
|
+
- 🔄 **Dependency Injection:** Streamline your application's architecture by effortlessly injecting dependencies.
|
|
11
|
+
- 🔍 **Profound Validation:** Simplify data validation with expressive and comprehensive validation capabilities.
|
|
12
|
+
|
|
13
|
+
## Getting Started
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @galeh/chuka
|
|
17
|
+
```
|
|
6
18
|
```typescript
|
|
7
19
|
// main.ts
|
|
20
|
+
import { createApp, json } from '@galeh/chuka';
|
|
21
|
+
import { CatsController, CatsService } from './your-modules'; // Customize based on your project structure
|
|
22
|
+
|
|
8
23
|
const app = createApp({
|
|
9
24
|
dependencies: [
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
useClass: CatsService
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
routes: [
|
|
16
|
-
{
|
|
17
|
-
path: '/cats',
|
|
18
|
-
controller: CatsController
|
|
19
|
-
}
|
|
25
|
+
{ provide: 'catservice', useClass: CatsService },
|
|
26
|
+
// Add more dependencies as needed
|
|
20
27
|
],
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
]
|
|
28
|
+
routes: [{ path: '/cats', controller: CatsController }],
|
|
29
|
+
middlewares: [json()],
|
|
24
30
|
});
|
|
25
31
|
|
|
26
32
|
app.use((error: any, req: any, res: any, next: any) => {
|
|
27
33
|
res.status(400).json(error);
|
|
28
|
-
})
|
|
34
|
+
});
|
|
29
35
|
|
|
30
36
|
app.listen(8080, () => {
|
|
31
|
-
console.log('
|
|
37
|
+
console.log('🚀 Running @galeh/chuka application on port 8080!');
|
|
32
38
|
});
|
|
33
39
|
|
|
34
40
|
```
|
|
35
41
|
|
|
36
42
|
```typescript
|
|
37
|
-
//
|
|
43
|
+
// a typical controller
|
|
38
44
|
|
|
39
45
|
@injectable()
|
|
40
46
|
export class CatsController extends Controller {
|
|
@@ -75,3 +81,9 @@ export class CatsController extends Controller {
|
|
|
75
81
|
}
|
|
76
82
|
|
|
77
83
|
```
|
|
84
|
+
Explore the possibilities and experience a new level of Express.js development with [@galeh/chuka](https://www.npmjs.com/package/@galeh/chuka). 🌟
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
GitHub Repository | npm Package
|
|
88
|
+
|
|
89
|
+
Feel the power of Chuka in your Express.js applications! 🔥🚀
|