Skip to content

How to use exactly orchy-core server? #604

@nicolalandro

Description

@nicolalandro

How to correctly configure and run Orchy as an orchestrator of the micro frontend?

I'm studying Orchy on that codebase and I correctly created a svelte mfe (orchy/svelte-mfe) using the cli.
After I prepare and run the server:

...
"scripts": {
    "prepare": "cd ./node_modules/orchy-core && pnpm i",
    "orchy": "cd ./node_modules/orchy-core && pnpm w:wc dev",
    ...
}
...

I see the error that it cannot reach something like /api/v1/configuration/ so I write the orchy-config.json, page-config.json and page-cnfig.html into orchy/orchy_static and I serve it correctly using fastify (orchy/main.js):

...
fastify.register(require('@fastify/static'), {
    root: path.join(__dirname, 'orchy_static'),
    prefix: '/api/v1/configuration/',
})
...

If I go to localhost:3000/api/v1/configuration/page-config.com work but because the HTML that I wrote works in a normal web browser, instead the localhost:5173 seems not to work also if the warning is solved.

What do I wrong? How to use it correctly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions