tourniquet
v1.3.7-alpha
Published
Registry Service
Downloads
26
Readme
Tourniquet
Tourniquet is a service registry build primarily on Node.js/io.js, Redis and Socket.io, inspired by Thalassa.
Registry Service by Vou de Ônibus.
Table of contents
- Quick start
- Starting as a server
- Starting as a client
- Bugs and feature requests
- Contributing
- Versioning
- License
Quick start
Several quick start options are available:
- Clone the repo:
git clone https://github.com/voudeonibus/Tourniquet.git
. - Install with npm:
npm install tourniquet
.
Starting as a server
var Tourniquet = require('tourniquet');
Tourniquet();
Options
- port: Tourniquet socket port | default: 5000
- redis_port: port of redis | default: 6379
- redis_host: host of redis | default: 127.0.0.1
- redis_password: password of redis | default: undefined
- redis_db: name of database on redis | default: 4
Note
You can configure all options as environment variables in UpperCase(eg: REDIS_PORT), except the parameter port, that as environment variables should be TOURNIQUET_PORT
Example
var Tourniquet = require('tourniquet');
Tourniquet({
port: 5000,
redis_port: 6379
});
Starting as a client
var Tourniquet = require('tourniquet/client');
var client = new Tourniquet({
service: 'my-service',
version: '1.0.0',
port: 8080
});
Options
- service: name of your service | optional
- version: version of your service | optional
- host: host of your service | optional
- port: port of your service | optional
- listener: run the client as listener | If you do not provide any service to register, the client will run as a listener by default
- tourniquet_port: port of server tourniquet | default: 5000
- tourniquet_host: host of server tourniquet | default: http://localhost
Note
You can configure all options of Tourniquet as environment variables in UpperCase (eg: TOURNIQUET_PORT).
Example
var Tourniquet = require('tourniquet/client');
var client = new Tourniquet({
service: 'my-service',
version: '1.0.0',
port: 8080,
tourniquet_port: 5000,
tourniquet_host: '127.0.0.1'
});
Bugs and feature requests
Have a bug or a feature request? Please first search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.
Versioning
For transparency into our release cycle and in striving to maintain backward compatibility, Tourniquet is maintained under the Semantic Versioning guidelines. Sometimes we screw up, but we'll adhere to those rules whenever possible.