Skip to content

Extracting nodeserver #14

@rikkertkoppes

Description

@rikkertkoppes

MHub currently already has an exported MClient, which is defined in nodeclient.ts. However, there is no nodeserver equivalent of it.

If one wants to embed a nodejs server into another application, one has to create a hub initialize transports for it, basically a lot of what is defined in mhub-server.ts, which is the cli script.

My proposal is to create a nodeserver.ts, extracting the server relevant bits from mhub-server (like creating the hub, setting up transports and authenticators and adding nodes). This is basically the bottom part of mhub-server.ts

I am happy to work on it and create a pull request for it. Are there any ideas / thoughts you have that I should take into account before working on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions