Server

Server

This is the primary dependency for the Blackrock Application Server. It loads the Core module initially, which in turn loads all remaining modules and interfaces. If the application server is being included within another Node.JS application as a dependency (is-blackrock), then the core module object will be exported to the parent application.

Examples

// EXAMPLE 1: PROMISES

// Get Inactive Application Server:
const blackrock = require('is-blackrock');

// Start Server (Using Promise):
blackrock.init()
  .then(function(core) {
    console.log(core.status);
    // Output: 'Active' (if server has finished initialising)
  });
// EXAMPLE 2: CALLBACKS

// Get Inactive Application Server:
const blackrock = require('is-blackrock');

// Start Server (Using Callback):
blackrock.init(function(core) {
  console.log(core.status);
  // Output: 'Active' (if server has finished initialising)
});
// EXAMPLE 3: STAND-ALONE (COMMAND-LINE / BLOCKING):
> blackrock start console
// EXAMPLE 4: STAND-ALONE (COMMAND-LINE / DAEMON):
> blackrock start

Namespaces

Interfaces
Modules