incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 罗枝銮 <luozhil...@gmail.com>
Subject Re: 答复: my god, i need you help !!!
Date Fri, 30 Nov 2012 10:41:50 GMT
首先谢谢你在我最需要帮助时,收到你的回复。

问题是这样的:


一 、转发url后错误情况

页面代码:<script src="vendor/couchapp/loader.js<view-source:http://www.infoing.com/vendor/couchapp/loader.js>
"></script>

  <script type="text/javascript" charset="utf-8">    var opts =
{db:'website', design:'website'};    $.couch.app(function(app,opts) {
    $("#items").evently("items", app);    }, opts);  </script>


我使用以下配置:
vhosts: www.infoing.com /website/_design/website/_rewrite
to /website/_design/website from /website/*

在:E:\couchdb\website\vendor\couchapp\_attachments\jquery.couch.app.js
文件中,259行,添加了
添加行:alert(JSON.stringify(appExports));
下一行: appFun.apply(appExports, [appExports]);

转发访问主页(http://www.infoing.com/hello.html),上文中alert得到的信息是:
{"db":{"name":"website","uri":"/website/"},"design":{"doc_id":"_design/website"},"req":{"path":["hello.html"],"query":{"":"undefined"}}}


二、 未进行外网url转发正确
访问主页(http://127.0.0.1:5984/website/_design/website/hello.html)得到如下正确信息
{
    "db": {
        "name": "website",
        "uri": "/website/"
    },
    "design": {
        "doc_id": "_design/website"
    },
    "req": {
        "path": ["website", "_design", "website", "hello.html"],
        "query": {
            "": "undefined"
        }
    },
    "ddoc": {
        "_id": "_design/website",
        "_rev": "99-80b0e2f0ea8aa396f5e84bd4b3c068ef",
        "rewrites": [{
            "to": "index.html",
            "from": "/"
         之后略过,完整的ddoc.


不知道我这样讲你看的明白吗,真诚希望能得到你的帮忙。我想用couchdb做有意义的网站。
幸苦你了。

br
罗枝銮
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message