Skip to content

Integrate GLSP WebSocketServerLauncher with NestJS Gateway #1415

Discussion options

You must be logged in to vote

Thanks for the answer!
I found that it's not possible to integrate it directly into the NestJS workflow because both GLSP and NestJS use Containers, which instantiate their own classes. If I decorate the WebSocketLauncher with both @Injectable decorators, it will create one instance in each framework's containers.

Anyway, my problem was not that. Instead, I was trying to communicate the GLSP Server with my NestJS services to get the models from the database and needed to authenticate in some way.
Finally, I solved this by making custom Client Sessions in which I add authentication data sent from ws at the 'sec-websocket-protocol', and then make custom WebSocketServerLauncher and GLSPServe…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@giuliano-marinelli
Comment options

Answer selected by giuliano-marinelli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants