all files / dist/config/ api.js

85.71% Statements 6/7
100% Branches 0/0
66.67% Functions 2/3
85.71% Lines 6/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174                  18×                                                                                                                                                                                                                                                                               18×                                                
'use strict';
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
/**
 * General configs.
 */
exports.default = {
 
  general: function general(api) {
    return {
      // ---------------------------------------------------------------------
      // API version
      // ---------------------------------------------------------------------
      apiVersion: '0.0.1',
 
      // ---------------------------------------------------------------------
      // Server name
      // ---------------------------------------------------------------------
      serverName: 'Stellar API',
 
      // ---------------------------------------------------------------------
      // A unique token to the application that servers will use to
      // authenticate to each other
      //
      // If this is not present an id will be generated dynamically.
      // ---------------------------------------------------------------------
      serverToken: 'change-me',
 
      // ---------------------------------------------------------------------
      // Welcome message seen by TCP and WebSocket clients upon connection
      // ---------------------------------------------------------------------
      welcomeMessage: 'Hello human! Welcome to Stellar',
 
      // ---------------------------------------------------------------------
      // The Redis prefix for Stellar's cache objects
      // ---------------------------------------------------------------------
      cachePrefix: 'stellar:cache',
 
      // ---------------------------------------------------------------------
      // The Redis prefix for Stellar's cache/lock objects
      // ---------------------------------------------------------------------
      lockPrefix: 'stellar:lock',
 
      // ---------------------------------------------------------------------
      // How long will a lock last before it expires (ms)
      // ---------------------------------------------------------------------
      lockDuration: 1000 * 10, // 10 seconds
 
      // ---------------------------------------------------------------------
      // By default the Stellar are in development mode
      // ---------------------------------------------------------------------
      developmentMode: true,
 
      // ---------------------------------------------------------------------
      // Number of action who can be executed simultaneous by a single
      // connection.
      // ---------------------------------------------------------------------
      simultaneousActions: 5,
 
      // ---------------------------------------------------------------------
      // Allow connection to be created without remoteIP and remotePort
      //
      // They will be set to 0
      // ---------------------------------------------------------------------
      enforceConnectionProperties: true,
 
      // ---------------------------------------------------------------------
      // Params you would like hidden from any logs
      // ---------------------------------------------------------------------
      filteredParams: [],
 
      // ---------------------------------------------------------------------
      // Values that signify missing params
      // ---------------------------------------------------------------------
      missingParamChecks: [null, '', undefined],
 
      // ---------------------------------------------------------------------
      // Which channel to use on redis pub/sub for RPC communication
      // ---------------------------------------------------------------------
      channel: 'stellar',
 
      // ---------------------------------------------------------------------
      // How long to wait for an RPC call before considering it a failure
      // ---------------------------------------------------------------------
      rpcTimeout: 5000,
 
      // ---------------------------------------------------------------------
      // The default priority level given to middleware of all types
      // ---------------------------------------------------------------------
      defaultMiddlewarePriority: 100,
 
      // ---------------------------------------------------------------------
      // Default filetype to serve when a user requests a directory
      // ---------------------------------------------------------------------
      directoryFileType: 'index.html',
 
      // ---------------------------------------------------------------------
      // Configurations for Stellar project structure
      // ---------------------------------------------------------------------
      paths: {
        'public': api.scope.rootPath + '/public',
        'temp': api.scope.rootPath + '/temp',
        'pid': api.scope.rootPath + '/temp/pids',
        'log': api.scope.rootPath + '/temp/logs'
      },
 
      // ---------------------------------------------------------------------
      // Hash containing chat rooms to be created at server boot
      //
      // Format:
      //  {roomName: {authKey, authValue}}
      //
      // Example:
      //  'secureRoom': {authorized: true}
      // ---------------------------------------------------------------------
      startingChatRooms: {
        'defaultRoom': {}
      },
 
      // ---------------------------------------------------------------------
      // This activates some system actions, these allow obtain the status of
      // the server.
      // ---------------------------------------------------------------------
      enableSystemActions: true,
 
      // ---------------------------------------------------------------------
      // Documentation
      //
      // If active the Stellar will generate documentation , on the startup,
      // for all loaded actions. This will be accessible from
      // `:serverAddress/docs`.
      // ---------------------------------------------------------------------
      generateDocumentation: true
    };
  }
 
};
 
/**
 * Test configs.
 *
 * @type {{}}
 */
 
var test = exports.test = {
  general: function general(api) {
    return {
      id: 'test-server',
      developmentMode: true,
      startingChatRooms: {
        defaultRoom: {},
        otherRoom: {}
      },
      generateDocumentation: false
    };
  }
};
 
/**
 * Production configs.
 *
 * @type {{}}
 */
var production = exports.production = {
  general: function general(api) {
    return {
      developmentMode: false
    };
  }
};
//# sourceMappingURL=api.js.map