1.0.0 โ€ข Published 5 years ago

find_server_abhishekwebcode v1.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

A module to find the server with lowest priority

๐Ÿ  You can reach me via this link

Install

npm install find_server_abhishekwebcode 

Usage

Just require library from npm or your cloned repository and run it
the module contains a findServer method which you can run
to find the least priority server having status code between 200 & 299
const findServer = require('find_server_abhishekwebcode');
const result = await findServer.findServer(myServerArray);

Here the myServerArray is an array of input to library

It has the format

{
    url: "<url of the server>",
    priority: "<priority of the server>"
}

This library returns a promise

Resolves with the server if found

Rejects with an error if list is empty or no server is found to be available

Run tests

npm run test

Author

๐Ÿ‘ค Abhishek Mathur mathur17021play@gmail.com