Scout is a daemon that serves feature flag data from Compass to connected SDK clients, as part of the Pioneer feature flag management architecture. For more information, visit Pioneer's case study page.
Scout is set up as a subscriber of NATS messages from the DATA
and KEY
streams. The DATA
stream is used to receive updated feature flag rulesets from Compass. They KEY
stream is used to receive the current valid SDK key from Compass.
Pioneer's SDK clients (installed in the user application) will request to connect to Scout as server-sent event clients. Scout will verify the legitimacy of the SDK client via the SDK key. Once authenticated, Scout will transmit up-to-date feature flag rulesets to the SDKs via server-sent events.
Within the root directory: npm install
.
npm start
App will run on port :3030
.
This application should be subscribed to a NATS server in order to receive messages from Compass app. See below for how to start NATS:
Ensure Docker is running then docker pull nats
to pull nats server.
To run server in detached mode: docker run -d --name nats-main -p 4222:4222 -p 6222:6222 -p 8222:8222 nats --js
To stop the docker container when finished with server:
// get container ID
docker ps
docker stop <container ID>
Run the following from the root directory:
npm test