EddieHubCommunity / api

API to manage our community data
https://api.eddiehub.io
MIT License
68 stars 63 forks source link

[FEATURE] Emit Event via Websockets whenever a new Github Event is created #273

Closed Cahllagerfeld closed 2 years ago

Cahllagerfeld commented 2 years ago

⭐ Suggestion

For the interactive Map project, the API needs to be able to establish WebSocket connections

Concept

Requirements

Implementation

Things to discuss

stemount commented 2 years ago

How should we configure CORS - Should we wildcard it, or only allow specific URLs to connect?

Is this solution only really required by *.eddiehub.tld for websockets? I think if it's only really useful for internal stuff then we should have a CORS/security policy for said domain.

As websockets are so lightweight by design (over a REST API), I would say opening it up to the world would be absolutely fine.

How do we want to document the WS-API? From my research[https://github.com/nestjs/nest/issues/1794] that's not supported with Swagger and also not planned

This looks very promising. https://github.com/nestjs/swagger/issues/191#issuecomment-483326237