@mobtakronio/capskit 0.1.0 → 0.1.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 +7 -7
- package/dist/index.cjs +21509 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +21520 -27
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -51,16 +51,16 @@ import { createCapsKit } from '@mobtakronio/capskit';
|
|
|
51
51
|
import { Elysia } from 'elysia';
|
|
52
52
|
import * as path from 'path';
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
// Simplified initialization: starts, auto-loads built-ins, and builds router in one call!
|
|
55
|
+
const { router, capskit } = await createCapsKit({
|
|
56
|
+
capsuleDirs: [path.resolve('./custom-capsules')],
|
|
57
|
+
boot: {
|
|
58
|
+
action: 'http.buildRouter',
|
|
59
|
+
payload: { adapter: 'elysia' }
|
|
60
|
+
},
|
|
56
61
|
dependencies: { db: myDatabase }
|
|
57
62
|
});
|
|
58
63
|
|
|
59
|
-
await capskit.start();
|
|
60
|
-
|
|
61
|
-
// Mount to Elysia automatically!
|
|
62
|
-
const { router } = await capskit.call('http.buildRouter', { adapter: 'elysia' });
|
|
63
|
-
|
|
64
64
|
new Elysia()
|
|
65
65
|
.use(router)
|
|
66
66
|
.listen(3000);
|