Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please expose functionality to allow non-Express http servers (eg. Koa) to add their own routes for colyseus-monitor #9

Open
rnd256 opened this issue Nov 17, 2019 · 3 comments

Comments

@rnd256
Copy link

rnd256 commented Nov 17, 2019

I would love to use this, but it looks like an express server is required.

@endel
Copy link
Member

endel commented Nov 27, 2019

It would be nice to support it out of the box, but I'm not sure how to handle this, since koa lacks a built-in router. (https://github.com/koajs/koa/blob/master/docs/koa-vs-express.md#koa-routing-third-party-libraries-support)

Supporting both koa-router and koa-route (maybe others?) may not be the best approach. If you have any ideas please let me know!

EDIT: here's how we're handling for express: https://github.com/colyseus/colyseus-monitor/blob/master/src/index.ts#L13-L18

@seiyria
Copy link
Contributor

seiyria commented Nov 27, 2019

Express is still fairly commonly used. If anything at all, I think this should be made mountable to whatever a user wants (as a breaking change). That way, flavor of the month webservers will not need to be added.

@rnd256
Copy link
Author

rnd256 commented Nov 29, 2019

I like @seiyria's idea of effectively making this mountable. So, exposing functionality that would allow developers to attach the colyseus-monitor APIs and static fileserver to whichever http server framework they want.

Allowing fixed paths to be customizable is probably more hassle than it's worth, but allowing developers to specify a prefix for all the APIs might be doable.

I'll change the title of this issue to reflect this.

@rnd256 rnd256 changed the title Please add support for Koa servers Please expose functionality to allow non-Express http servers (eg. Koa) to add their own routes for colyseus-monitor Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants