UNPKG

ar-server

Version:

Provides a full featured application server on top of Koa.

42 lines (33 loc) 864 B
/** * ActiveRules Server module * * This provides the core ActiveRules logic for parsing a request and creating a response. * It handles multiple domains with different services and localized content. * * @module arkoa * @copyright 2015 - Brian Winkers * @license ISC */ /** Use Bluebird for Promises */ var Promise = require('bluebird'); /** Use Lazy as a faster alternative to lodash */ var _ = require('lazy'); /** * Export the constructor function defined below */ exports = module.exports = Server; /** * The constructor function * To maintain a consistent signature overtime we just expect one config object * * @constructor */ function Server() { } /** * Register a Service */ Server.prototype.registerService = function registerService(service) { // Determine if we have a directory string or service object. // If its };