GLSP Server
Contains the code for the Typescript-based framework to create GLSP server components. The implementation of this server is aligned with the default Java based GLSP Server.
The server consists of three components:
@eclipse-glsp/server
The base framework for building GLSP servers@eclipse-glsp/graph
The Typescript based implementation of the graphical model used in GLSP (GModel).@eclipse-glsp-examples/workflow-server
GLSP example server using the workflow model.
The main target environment is node, nevertheless, all components are implemented in an ismorphic fashion and also provide an entrypoint to target browser environments (e.g. running the server in a web worker)
Build
Install dependencies and build via
yarn
Only build via
yarn build
Lint packages via
yarn lint
or do all of the above via
yarn all
Testing
Unit tests
To execute all available test suits use:
yarn test
It's also possible to execute and debug a single test file in VSCode/Theia via the File explorer.
Simply select a test file (*.spec.ts
), then go to the Run & Debug
View (Ctrl+Shift+D
), select the 'Run current test" launch config and start debugging (Ctrl+F11
)
Start & Debug
Socket
To launch the server for TCP sockets use:
yarn start
This starts a server that is listening on port 5007 for incoming client requests.
To debug you can use the Debug workflow example GLSP Server
launch configuration.
To test the server you have to connect a workflow GLSP client that supports JSON-RPC via socket.
We recommend to use the client provided by the glsp-integration
.
Websocket
To launch the server for WebSockets use:
yarn start:websocket
This starts a server that is listening on the ws://localhost:8081/workflow
endpoint for incoming client requests.
To debug you can use the Debug workflow example GLSP Server (Websocket)
launch configuration.
To test the server you have to connect a workflow GLSP client that supports JSON-RPC via WebSocket.
We recommend to use the standalone example provided by glsp-client
.
More information
For more information, please visit the Eclipse GLSP Umbrella repository and the Eclipse GLSP Website. If you have questions, please raise them in the discussions and have a look at our communication and support options.