github.com/olivere/camlistore@v0.0.0-20140121221811-1b7ac2da0199/config/dev-server-config.json (about)

     1  { "_for-emacs": "-*- mode: js2;-*-",
     2    "handlerConfig": true,
     3    "baseURL": ["_env", "${CAMLI_BASEURL}"],
     4    "auth": ["_env", "${CAMLI_AUTH}"],
     5    "https": ["_env", "${CAMLI_TLS}", false],
     6    "TLSCertFile": "config/selfgen_pem.crt",
     7    "TLSKeyFile": "config/selfgen_pem.key",
     8    "prefixes": {
     9       "/": {
    10           "handler": "root",
    11           "handlerArgs": {
    12               "ownerName": ["_env", "${USER}-dev"],
    13               "blobRoot": "/bs-recv/",
    14               "statusRoot": "/status/",
    15               "searchRoot": "/my-search/",
    16               "stealth": false
    17           }
    18       },
    19  
    20        "/blog/": {
    21            "enabled": ["_env", "${CAMLI_PUBLISH_ENABLED}"],
    22            "handler": "publish",
    23            "handlerArgs": {
    24                "rootName": "dev-blog-root",
    25                "blobRoot": "/bs/",
    26                "searchRoot": "/my-search/",
    27                "cache": "/cache/",
    28                "goTemplate": "blog.html",
    29                "devBootstrapPermanodeUsing": "/sighelper/"
    30            }
    31        },
    32  
    33        "/pics/": {
    34            "enabled": ["_env", "${CAMLI_PUBLISH_ENABLED}"],
    35            "handler": "publish",
    36            "handlerArgs": {
    37                "rootName": "dev-pics-root",
    38                "blobRoot": "/bs/",
    39                "searchRoot": "/my-search/",
    40                "cache": "/cache/",
    41                "css": ["pics.css"],
    42                "js": ["pics.js"],
    43                "goTemplate": "gallery.html",
    44                "devBootstrapPermanodeUsing": "/sighelper/"
    45            }
    46        },
    47  
    48        "/stub-test-disable/": {
    49            "handler": "publish",
    50            "enabled": false,
    51            "handlerArgs": {
    52            }
    53        },
    54  
    55       "/ui/": {
    56           "handler": "ui",
    57           "handlerArgs": {
    58               "sourceRoot": ["_env", "${CAMLI_DEV_CAMLI_ROOT}", ""],
    59               "jsonSignRoot": "/sighelper/",
    60               "cache": "/cache/",
    61               "scaledImage": {
    62                  "type": "kv",
    63                  "file": ["_env", "${CAMLI_ROOT_CACHE}/thumbnails.kv", ""]
    64               },
    65               "publishRoots": ["/blog/", "/pics/"]
    66           }
    67       },
    68  
    69       "/status/": {
    70           "handler": "status"
    71       },
    72  
    73        "/sync-index/": {
    74            "handler": "sync",
    75            "handlerArgs": {
    76                "from": "/bs/",
    77                "to": ["_env", "${CAMLI_INDEXER_PATH}"],
    78                "queue": { "type": "memory" },
    79                "fullSyncOnStart": ["_env", "${CAMLI_FULL_INDEX_SYNC_ON_START}"],
    80                "blockingFullSyncOnStart": ["_env", "${CAMLI_FULL_INDEX_SYNC_ON_START}"]
    81            }
    82        },
    83  
    84        "/sync-r1/": {
    85            "handler": "sync",
    86            "handlerArgs": {
    87                "from": "/bs/",
    88                "to": "/r1/",
    89                "queue": { "type": "memory" }
    90            }
    91        },
    92  
    93        "/sighelper/": {
    94            "handler": "jsonsign",
    95            "handlerArgs": {
    96                "secretRing": ["_env", "${CAMLI_SECRET_RING}"],
    97                "keyId": ["_env", "${CAMLI_KEYID}"],
    98                "publicKeyDest": "/bs/"
    99            }
   100       },
   101  
   102        "/bs-recv/": {
   103            "handler": "storage-replica",
   104            "handlerArgs": {
   105                "minWritesForSuccess": 2,
   106                "backends": ["/bs/", ["_env", "${CAMLI_INDEXER_PATH}"]],
   107                "readBackends": ["/bs/"]
   108            }
   109        },
   110  
   111        "/cond-unused/": {
   112            "handler": "storage-cond",
   113            "handlerArgs": {
   114                "write": {
   115                    "if": "isSchema",
   116                    "then": "/bs-recv/",
   117                    "else": "/bs/"
   118                },
   119                "read": "/bs/"
   120            }
   121        },
   122  
   123       "/bs/": {
   124           "handler": "storage-filesystem",
   125           "handlerArgs": {
   126              "path": ["_env", "${CAMLI_ROOT}"]
   127            }
   128       },
   129  
   130       "/cache/": {
   131           "handler": "storage-filesystem",
   132           "handlerArgs": {
   133              "path": ["_env", "${CAMLI_ROOT_CACHE}"]
   134            }
   135       },
   136  
   137       "/sharder/": {
   138           "handler": "storage-shard",
   139           "handlerArgs": {
   140               "backends": ["/s1/", "/s2/"]
   141            }
   142       },
   143  
   144       "/s1/": {
   145           "handler": "storage-filesystem",
   146           "handlerArgs": {
   147              "path": ["_env", "${CAMLI_ROOT_SHARD1}"]
   148            }
   149       },
   150  
   151        "/s2/": {
   152            "handler": "storage-filesystem",
   153            "handlerArgs": {
   154                "path": ["_env", "${CAMLI_ROOT_SHARD2}"]
   155            }
   156        },
   157  
   158        "/repl/": {
   159            "handler": "storage-replica",
   160            "handlerArgs": {
   161                "backends": ["/r1/", "/r2/", "/r3/"],
   162                "minWritesForSuccess": 2
   163            }
   164        },
   165  
   166       "/r1/": {
   167           "handler": "storage-diskpacked",
   168           "handlerArgs": {
   169              "path": ["_env", "${CAMLI_ROOT_REPLICA1}"]
   170            }
   171       },
   172  
   173       "/r2/": {
   174           "handler": "storage-filesystem",
   175           "handlerArgs": {
   176              "path": ["_env", "${CAMLI_ROOT_REPLICA2}"]
   177            }
   178       },
   179  
   180       "/r3/": {
   181           "handler": "storage-filesystem",
   182           "handlerArgs": {
   183              "path": ["_env", "${CAMLI_ROOT_REPLICA3}"]
   184            }
   185       },
   186  
   187       "/enc/": {
   188            "handler": "storage-encrypt",
   189            "handlerArgs": {
   190                "I_AGREE": "that encryption support hasn't been peer-reviewed, isn't finished, and its format might change.",
   191                "meta": "/encmeta/",
   192                "blobs": "/encblob/",
   193                "metaIndex": { "type": "memory" },
   194                "key": "000102030405060708090a0b0c0d0e0f"
   195            }
   196        },
   197  
   198       "/encmeta/": {
   199           "handler": "storage-filesystem",
   200           "handlerArgs": {
   201              "path": ["_env", "${CAMLI_ROOT_ENCMETA}"]
   202            }
   203       },
   204  
   205       "/encblob/": {
   206           "handler": "storage-filesystem",
   207           "handlerArgs": {
   208              "path": ["_env", "${CAMLI_ROOT_ENCBLOB}"]
   209            }
   210       },
   211  
   212       "/index-kv/": {
   213           "enabled": ["_env", "${CAMLI_KVINDEX_ENABLED}"],
   214           "handler": "storage-kvfileindexer",
   215           "handlerArgs": {
   216               "blobSource": "/bs/",
   217               "file": ["_env", "${CAMLI_DBNAME}", ""]
   218           }
   219       },
   220  
   221       "/index-mongo/": {
   222           "enabled": ["_env", "${CAMLI_MONGO_ENABLED}", true],
   223           "handler": "storage-mongodbindexer",
   224           "handlerArgs": {
   225               "host": "localhost",
   226               "database": ["_env", "${CAMLI_DBNAME}"],
   227               "blobSource": "/bs/"
   228           }
   229       },
   230  
   231       "/index-mysql/": {
   232           "enabled": ["_env", "${CAMLI_MYSQL_ENABLED}", true],
   233           "handler": "storage-mysqlindexer",
   234           "handlerArgs": {
   235               "database": ["_env", "${CAMLI_DBNAME}"],
   236               "user": "root",
   237               "password": "root",
   238               "host": "127.0.0.1",
   239               "blobSource": "/bs/"
   240           }
   241       },
   242  
   243       "/index-postgres/": {
   244           "enabled": ["_env", "${CAMLI_POSTGRES_ENABLED}", true],
   245           "handler": "storage-postgresindexer",
   246           "handlerArgs": {
   247               "database": ["_env", "${CAMLI_DBNAME}"],
   248               "user": "postgres",
   249               "password": "postgres",
   250               "host": "127.0.0.1",
   251               "blobSource": "/bs/"
   252           }
   253       },
   254  
   255       "/index-sqlite/": {
   256           "enabled": ["_env", "${CAMLI_SQLITE_ENABLED}", true],
   257           "handler": "storage-sqliteindexer",
   258           "handlerArgs": {
   259               "file": ["_env", "${CAMLI_DBNAME}"],
   260               "blobSource": "/bs/"
   261           }
   262       },
   263  
   264       "/my-search/": {
   265           "handler": "search",
   266           "handlerArgs": {
   267               "index": ["_env", "${CAMLI_INDEXER_PATH}"],
   268               "owner": ["_env", "${CAMLI_PUBKEY_BLOBREF}"],
   269               "slurpToMemory": true,
   270               "devBlockStartupOn": "/sync-index/"
   271           }
   272       },
   273  
   274       "/importer-dummy/": {
   275           "handler": "importer-dummy",
   276           "handlerArgs": {
   277               "url": "http://localhost:8080/foo.json",
   278               "username": "alice",
   279               "authToken": "xyz"
   280           }
   281       },
   282  
   283      "/importer-flickr/": {
   284        "handler": "importer-flickr",
   285        "enabled": ["_env", "${CAMLI_FLICKR_ENABLED}", false],
   286        "handlerArgs": {
   287          "apiKey": ["_env", "${CAMLI_FLICKR_API_KEY}", ""]
   288        }
   289      },
   290  
   291      "/importer-foursquare/": {
   292        "handler": "importer-foursquare",
   293        "enabled": ["_env", "${CAMLI_FOURSQUARE_ENABLED}", false],
   294        "handlerArgs": {
   295          "apiKey": ["_env", "${CAMLI_FOURSQUARE_API_KEY}", ""]
   296        }
   297      },
   298  
   299       "/share/": {
   300           "handler": "share",
   301           "handlerArgs": {
   302               "blobRoot": "/bs/"
   303           }
   304       }
   305    }
   306  
   307  }