You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin wraps `@objectstack/hono` to provide a turnkey HTTP server solution for the Runtime. It binds the standard `HttpDispatcher` to a Hono application and starts listening on the configured port.
@@ -44,12 +49,21 @@ import { ObjectKernel } from '@objectstack/runtime';
44
49
45
50
const kernel =newObjectKernel();
46
51
52
+
// The MSW Plugin will initialize the HttpDispatcher and intercept requests
47
53
kernel.use(newMSWPlugin({
48
54
enableBrowser: true,
49
55
baseUrl: '/api/v1',
50
56
logRequests: true
51
57
}));
52
58
59
+
awaitkernel.start();
60
+
```
61
+
62
+
### Architecture
63
+
64
+
The plugin uses the `HttpDispatcher` from the Runtime to process requests intercepted by MSW. This means your mock server runs the **actual** ObjectStack business logic (permissions, validation, flow execution) in-memory, providing a high-fidelity simulation of the backend.
0 commit comments