Make sure you have Node.js installed.
$ bin/text-ranker
Optionally, specify the TCP (defaults to 5555
) and HTTP (defaults to 8080
) ports to use:
$ bin/text-ranker --tcp-port 4444 --http-port 9090
- Install the dependencies:
$ npm install
- Run the tests:
$ npm test
Use Redis in order to allow scaling up the application to run as multiple processes/servers. This means replacing inMemoryStorage
with an implementation that wraps the following commands:
Wrapper method | Redis command |
---|---|
redisStorage.count |
ZCOUNT |
redisStorage.getHighestScoringMembers |
ZREVRANGE |
redisStorage.incrementMemberScore |
ZINCRBY |
For the integration tests, set up a local Redis server using Vagrant.
Provide a --help
option.