using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
IP Addresses identify both a network as well as host on a network. Depending on the class of a network, certain amount of bits in the IP (32 bits overall) are allocated for network adressing and the rest is for: adressing the host on the network.
- Class A: first octet is network, last three: host
- Class B: first two octets are for network, last two: host
- Class C: first three octets are for network, only last octet is for host.
Furthermore, looking at the IP itself, you can tell which class of IP it is, using the following rules:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Module dependencies. | |
*/ | |
var pkg = require('../package'); | |
var env = process.env.NODE_ENV || 'development'; | |
/** | |
* Return setting `name`. | |
* |