1.0.0 • Published 8 years ago

devonport v1.0.0

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

Dev-On-Port

Generate TCP ports from strings, for predictable local development

Purpose

Ever worked in a big dev team doing micro-services? Production deployment is managed via a proper orchestration system but local dev can be a mess when everyone's services are fighting for port 8000-8010.

You need a predictable way of binding to a probably unused port in a predictable manner, so that other services can talk back to you reliably in your local environment.

Enter Dev-On-Port! the handy-dandy device that turns your service name into a port number between 1024 and 65000.

Example:

const devonport = require('devonport');

let port = devonport('my-cool-service-name');  // 61410

Now use port to bind too, and port from client code to talk to your local service by it's service name and not a number, it's like DNS for your ports! (not really)