API Gateway to handle messages using Express Gateway
To start the Chat API Gateway locally:
- Create local config if running for the first time:
echo 'ENV_CODE=local' >./env/.env
cp ./env/.local.example ./env/.local
- Install dependencies and run gateway service:
npm i
npm run start-local
The gateway starts on port 3080 locally.
npm run build
npm start
The main config for the gateway is gateway.config.yml.
Documentation for each config section can be found in Express Gateway Docs.
As soon as express-gateway's server is ready to accept http connections, the service also spins up a websocket server on port WEBSOCKET_PORT
.
Each websocket client is identified by their own sessionId
, and the server is able to send websocket messages to the right client through HTTP calls.
Chat API Gateway can be run locally against a dev Kubernetes bot through Tilt.dev. Setup and running instructions can be found in this confluence document.