NodeJS Configuration README

CONFIGURATION:

PART ONE: SIMPLE CONFIG:
  The simplest configuration setup for Datanet's NodeJS Agent is found
   in ~/node_modules/zync/conf/single_agent_DC1-1.cfg

  The file is a JSON object with the following syntax:
    {
      "device" : {
        "uuid_file" : "/tmp/AGENT_101" // AGENT PID FILE
      },
      "agent" : {
        "hostname" : "0.0.0.0",        // AGENT HTTPS CLIENT SERVER BIND IP
        "port"     : 30101             // AGENT HTTPS CLIENT SERVER BIND PORT
      },
      "database" : {
        "name" : "MEMORY"              // AGENT DATABASE PLUGIN [MONGO,REDIS,MEMORY]
      },
      "central" : {
        "name" : "D1",                 // DATANET CENTRAL NAME
        "https"   : {
          "hostname" : "127.0.0.1",    // DATANET CENTRAL HTTPS HOSTNAME
          "port"     : 10101           // DATANET CENTRAL HTTPS PORT
        },
      }
    }


  Multi-tentant Agents must have:
    1.) unique device.uuid_file
    2.) unique agent.hostname/port


PART TWO: EXTENDED CONFIG OPTIONS
  The file is a JSON object with the following syntax:
    {
      "device" : {
        "uuid_file" : "/tmp/AGENT_101" // SEE ABOVE
      },
      "agent" : {
        "hostname" : "0.0.0.0",        // SEE ABOVE
        "port"     : 30101             // SEE ABOVE
      },
      "database" : {
        "name" : "MEMORY"              // SEE ABOVE
      },
      "cache" : {
        "max_bytes" : 10000            // MAXIMUM BYES FOR LOCAL CACHE
      },
      "deltas" : {
        "max_bytes" : 1000             // MAXIMUM BYES FOR DELTA STORAGE
      },
      "central" : {
        "name" : "D1",                 // SEE ABOVE
        "https"   : {
          "hostname" : "127.0.0.1",    // SEE ABOVE
          "port"     : 10101           // SEE ABOVE
        },
        "callback" : {
          "hostname" : "127.0.0.1",
          "port"     : 10190,       // AGENT HTTPS CALLBACK SERVER BIND PORT
          "key"      : "UNIQUE KEY" // AGENT HTTPS CALLBACK SERVER UNIQUE KEY
        }
      },
    }

  NOTES:
    * central.callback is required for CENTRAL to push to AGENT via HTTPS
    * Maximum sizes for both data (cache.max_bytes) and
      deltas (deltas.max_bytes) are configurable