Source

wmexamples / priv / dispatch.conf

Diff from to

priv/dispatch.conf

  couchdb_proxy,                   %% defined in couchdb_proxy.erl
  {"http://localhost:8000/couch/", %% "ExternalPath" init param
   "http://localhost:5984/"}}.     %% "CouchPath" init param
+
+
+%% Environment Variable Inspection example
+%% Try:
+%%   curl http://localhost:8000/_env
+%%   curl -u webmachine:rules -H "Content-type: application/json" \
+%%        -X PUT http://localhost:8000/_env/DEMO --data "\"hello\""
+{["_env"],       %% exposed at /_env/
+ env_resource,   %% defined in env_resource.erl
+ []}.            %% no configuration
+
+{["_env", env],  %% exposed at /_env/VARIABLE_NAME
+ env_resource,   %% defined in env_resource.erl
+ []}.            %% no configuration