|
1 | | -import { ObjectKernel, DriverPlugin, AppPlugin, createApiRegistryPlugin } from '@objectstack/runtime'; |
2 | | -import { InMemoryDriver } from '@objectstack/driver-memory'; |
3 | | -import { ObjectQLPlugin } from '@objectstack/objectql'; |
4 | | -import { HonoServerPlugin } from '@objectstack/plugin-hono-server'; |
5 | | -import { MetadataPlugin } from '@objectstack/metadata'; |
6 | | -import path from 'path'; |
7 | | - |
8 | | -import CrmApp from '@example/app-crm/objectstack.config'; |
9 | | -import TodoApp from '@example/app-todo/objectstack.config'; |
10 | | -import BiPluginManifest from '@example/plugin-bi/objectstack.config'; |
11 | | - |
12 | | -(async () => { |
13 | | - console.log('🚀 Booting Kernel...'); |
14 | | - |
15 | | - // Use MiniKernel architecture |
16 | | - const kernel = new ObjectKernel(); |
| 1 | +// import { ObjectKernel, DriverPlugin, AppPlugin, createApiRegistryPlugin } from '@objectstack/runtime'; |
| 2 | +// import { InMemoryDriver } from '@objectstack/driver-memory'; |
| 3 | +// import { ObjectQLPlugin } from '@objectstack/objectql'; |
| 4 | +// import { HonoServerPlugin } from '@objectstack/plugin-hono-server'; |
| 5 | +// import { MetadataPlugin } from '@objectstack/metadata'; |
| 6 | +// import path from 'path'; |
| 7 | + |
| 8 | +// import CrmApp from '@example/app-crm/objectstack.config'; |
| 9 | +// import TodoApp from '@example/app-todo/objectstack.config'; |
| 10 | +// import BiPluginManifest from '@example/plugin-bi/objectstack.config'; |
| 11 | + |
| 12 | +// (async () => { |
| 13 | +// console.log('🚀 Booting Kernel...'); |
| 14 | + |
| 15 | +// // Use MiniKernel architecture |
| 16 | +// const kernel = new ObjectKernel(); |
17 | 17 |
|
18 | | - // Register Metadata Plugin (File System Loader) |
19 | | - // Best Practice: Load metadata early so it's available for other plugins |
20 | | - await kernel.use(new MetadataPlugin({ rootDir: path.resolve(__dirname, '../metadata') })); |
| 18 | +// // Register Metadata Plugin (File System Loader) |
| 19 | +// // Best Practice: Load metadata early so it's available for other plugins |
| 20 | +// await kernel.use(new MetadataPlugin({ rootDir: path.resolve(__dirname, '../metadata') })); |
21 | 21 |
|
22 | | - // Register ObjectQL engine |
23 | | - await kernel.use(new ObjectQLPlugin()); |
| 22 | +// // Register ObjectQL engine |
| 23 | +// await kernel.use(new ObjectQLPlugin()); |
24 | 24 |
|
25 | | - // Database driver |
26 | | - await kernel.use(new DriverPlugin(new InMemoryDriver(), 'memory')); |
| 25 | +// // Database driver |
| 26 | +// await kernel.use(new DriverPlugin(new InMemoryDriver(), 'memory')); |
27 | 27 |
|
28 | | - // App manifests |
29 | | - await kernel.use(new AppPlugin(CrmApp)); |
30 | | - await kernel.use(new AppPlugin(TodoApp)); |
31 | | - await kernel.use(new AppPlugin(BiPluginManifest)); |
| 28 | +// // App manifests |
| 29 | +// await kernel.use(new AppPlugin(CrmApp)); |
| 30 | +// await kernel.use(new AppPlugin(TodoApp)); |
| 31 | +// await kernel.use(new AppPlugin(BiPluginManifest)); |
32 | 32 |
|
33 | | - // Register API Registry (Required for Hono Server) |
34 | | - await kernel.use(createApiRegistryPlugin()); |
| 33 | +// // Register API Registry (Required for Hono Server) |
| 34 | +// await kernel.use(createApiRegistryPlugin()); |
35 | 35 |
|
36 | | - // Load the Hono Server Plugin |
37 | | - await kernel.use(new HonoServerPlugin({ |
38 | | - port: process.env.PORT ? parseInt(process.env.PORT) : 3004, |
39 | | - staticRoot: './public' |
40 | | - })); |
| 36 | +// // Load the Hono Server Plugin |
| 37 | +// await kernel.use(new HonoServerPlugin({ |
| 38 | +// port: process.env.PORT ? parseInt(process.env.PORT) : 3004, |
| 39 | +// staticRoot: './public' |
| 40 | +// })); |
41 | 41 |
|
42 | | - await kernel.bootstrap(); |
43 | | -})(); |
| 42 | +// await kernel.bootstrap(); |
| 43 | +// })(); |
0 commit comments