@gnar-engine/core 1.0.1 → 1.0.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/package.json +1 -1
- package/readme.md +4 -30
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,33 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+

|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### Gnar Engine - Service Core
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- AJV schema validation
|
|
7
|
-
- A command bus providing a single abstraction layer for executing functions within or between services
|
|
8
|
-
- Inter service messaging (Rabbit MQ)
|
|
9
|
-
- Logging
|
|
10
|
-
- Errors
|
|
11
|
-
- Database initialisation
|
|
12
|
-
- Handling for seeders & migrations
|
|
13
|
-
- Health checks
|
|
5
|
+
This is the Gnar Engine service core package. This should be used as a dependency for all Gnar Engine back-end services.
|
|
14
6
|
|
|
15
|
-
|
|
16
|
-
### message controller example implementation
|
|
17
|
-
|
|
18
|
-
``` javascript
|
|
19
|
-
import { messageController } from './controllers/message-controller.js';
|
|
20
|
-
|
|
21
|
-
await messageController.init({
|
|
22
|
-
config: {
|
|
23
|
-
queueName: 'userServiceQueue',
|
|
24
|
-
prefetch: 20
|
|
25
|
-
},
|
|
26
|
-
handlers: {
|
|
27
|
-
customJob: async (payload) => {
|
|
28
|
-
console.log('Handling customJob:', payload);
|
|
29
|
-
return { received: true };
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
```
|
|
7
|
+
To get started please do not download this package directly, but instead use the [Gnar CLI](@gnar-engine/cli) to create a new project.
|