https://github.com/ragingwind/node-bengbenge
Array for Round-Robin DNS service, bengbenge, beng, beng. for funny
https://github.com/ragingwind/node-bengbenge
Last synced: 24 days ago
JSON representation
Array for Round-Robin DNS service, bengbenge, beng, beng. for funny
- Host: GitHub
- URL: https://github.com/ragingwind/node-bengbenge
- Owner: ragingwind
- License: mit
- Created: 2013-06-26T11:43:41.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2022-03-14T06:42:24.000Z (over 4 years ago)
- Last Synced: 2025-04-01T17:13:09.113Z (over 1 year ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# bengbenge (뺑뺑이 in Korean) [](https://travis-ci.org/ragingwind/bengbenge)
> Simple loop array for round-robin dns, beng, beng. for funny.
## Install
```
$ npm install --save bengbenge
```
## Usage
```js
var bengbenge = require('bengbenge');
var dns = bengbenge('newapp.herokuapp.com');
['app1', 'app2', 'app3', 'app4', 'app5']
dns.append(5, function (index, length) {
length++;
return {
name: 'site' + length,
url: length + '.newapp.herokuapp.com'
};
});
redirect(dns.beng().url);
```
For more information, Please refer to test/bengbenge_test.js
## API
### bengbenge(dns)
Pass base name of DNS will be route. It will return instance of loop array
### LoopArray
Supports all of api of Array and append, clear, remove and beng
#### beng()
It will return next item in Array.
#### append([count], [array/object])
It supports a variety types of arguments.
## License
MIT © [Jimmy Moon](http://ragingwind.me)