0.32.14 • Published 4 years ago
chat-api-gateway v0.32.14
chat-api-gateway
API Gateway to handle messages using Express Gateway
Usage
Run locally
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.
Run with Docker
npm run build
npm start
Description
Gateway Configuration
The main config for the gateway is gateway.config.yml.
Documentation for each config section can be found in Express Gateway Docs.
WebSocket Configuration
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.
Running with Kubernetes
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.