You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by tomy <to...@yahoo.com> on 2010/06/09 19:09:08 UTC

couchdb local.ini set up

Hi All,
I'm a brand new beginner on couchdb, and really have a problem to set up the
local.ini file for my ui. I'm using OS X, if some one there can send me some
sample how do it, and where i have to put my ui files in couchdb.
How to connect my ui to db?
Any help will be appreciated

regards,
tomy



Re: couchdb local.ini set up

Posted by J Chris Anderson <jc...@gmail.com>.
On Jun 10, 2010, at 10:14 AM, farad wrote:

> Randall Leeds <ra...@...> writes:
> 
>> 
>> Hi, Tomy.
>> 
>> Not sure what you mean by UI. If you refer to the Futon web interface
>> it should be enabled by default. Simply launch couchdb and go to
>> http://127.0.0.1/_utils in your browser.
>> 
>> Did you install from source/homebrew or using CouchDB X?
>> 
>> -Randall
>> 
>> 
> Hi, Randall,
> all ui files of my project is in the dir 'share/couchdb/www/myproject'. My
> program takes user entry data from ui and serialize it in to json file. Next
> what i need save this json file to mydb at cuouchdb. And then fetch data from
> mydb to display them on ui 
> 

You should probably take a look at the CouchApp project, which allows you to move this myproject directory to a CouchDB document, so that it can replicate along with the data.

http://couchapp.org (is a couchapp)

http://github.com/couchapp/couchapp (the dev tool)

http://books.couchdb.org/relax/example-app/design-documents (how to use it)

> thanks,
> farad
> 
> 
> 


Re: couchdb local.ini set up

Posted by tomy <to...@yahoo.com>.
Thanks a lot guys for ur help I really appreciate it:
Could u please explain how can I modify
this 'app.db.saveDoc({channel:cname,message:message});' for my application,
how the saveDoc() function works

function joinChannel(app, cname) {
  var authorRand = Math.random().toString();
  $("#frPage").submit(function() {
    var apl, apid, first, last, dsc, email, _id;
    apl = $("#app").val();
    apid = $("#appid").val();
    first = $("#first").val();
    last = $("#last").val();
    dsc = $("#desc").val();
    email = $("#email").val();
    if (apl) {
      var message = {
        _id:idGenerator(),
        apinfo: { apl : apl,  apid:apid, dsc:dsc
        },
        owner:{ first:first, last:last, email:email
        },
        date : new Date()
      };
      alert(JSON.stringify(message));
      app.db.saveDoc({channel:cname,message:message});
    }
    return false;
  }) 

thanks



Re: couchdb local.ini set up

Posted by J Chris Anderson <jc...@gmail.com>.
On Jun 10, 2010, at 5:27 PM, farad wrote:

> Randall Leeds <ra...@...> writes:
> 
>> 
>> There is no reason to put your application data in the www directory.
>> CouchDB can serve files as attachments to database documents without a
>> problem, which is how CouchApp functions. You should not need to
>> modify local.ini.
>> 
>> On Thu, Jun 10, 2010 at 10:14, farad <to...@...> wrote:
>>> Randall Leeds <ra...@...> writes
> 
>> 
>> 
> Function which i'm using returns jObj = {}. All data look like 
> {"app":"Intersept","appid":"1212321","first":"John","desc":"some info
> here","last":"Peterson","email":"my@may.com","srvs":"cache,queue,asset"}
> Using click event how can i save this data to 'mydb' at couchdb. 

http://github.com/jchris/toast/blob/selectorstash/_attachments/app.js#L57


> 
> thanks,
> farad
> 
> 
> 


Re: couchdb local.ini set up

Posted by farad <to...@yahoo.com>.
Randall Leeds <ra...@...> writes:

> 
> There is no reason to put your application data in the www directory.
> CouchDB can serve files as attachments to database documents without a
> problem, which is how CouchApp functions. You should not need to
> modify local.ini.
> 
> On Thu, Jun 10, 2010 at 10:14, farad <to...@...> wrote:
> > Randall Leeds <ra...@...> writes

> 
> 
Function which i'm using returns jObj = {}. All data look like 
{"app":"Intersept","appid":"1212321","first":"John","desc":"some info
here","last":"Peterson","email":"my@may.com","srvs":"cache,queue,asset"}
Using click event how can i save this data to 'mydb' at couchdb. 

thanks,
farad




Re: couchdb local.ini set up

Posted by Randall Leeds <ra...@gmail.com>.
There is no reason to put your application data in the www directory.
CouchDB can serve files as attachments to database documents without a
problem, which is how CouchApp functions. You should not need to
modify local.ini.

On Thu, Jun 10, 2010 at 10:14, farad <to...@yahoo.com> wrote:
> Randall Leeds <ra...@...> writes:
>
>>
>> Hi, Tomy.
>>
>> Not sure what you mean by UI. If you refer to the Futon web interface
>> it should be enabled by default. Simply launch couchdb and go to
>> http://127.0.0.1/_utils in your browser.
>>
>> Did you install from source/homebrew or using CouchDB X?
>>
>> -Randall
>>
>>
> Hi, Randall,
> all ui files of my project is in the dir 'share/couchdb/www/myproject'. My
> program takes user entry data from ui and serialize it in to json file. Next
> what i need save this json file to mydb at cuouchdb. And then fetch data from
> mydb to display them on ui
>
> thanks,
> farad
>
>
>
>

Re: couchdb local.ini set up

Posted by farad <to...@yahoo.com>.
Randall Leeds <ra...@...> writes:

> 
> Hi, Tomy.
> 
> Not sure what you mean by UI. If you refer to the Futon web interface
> it should be enabled by default. Simply launch couchdb and go to
> http://127.0.0.1/_utils in your browser.
> 
> Did you install from source/homebrew or using CouchDB X?
> 
> -Randall
> 
> 
Hi, Randall,
all ui files of my project is in the dir 'share/couchdb/www/myproject'. My
program takes user entry data from ui and serialize it in to json file. Next
what i need save this json file to mydb at cuouchdb. And then fetch data from
mydb to display them on ui 

thanks,
farad




Re: couchdb local.ini set up

Posted by Randall Leeds <ra...@gmail.com>.
Hi, Tomy.

Not sure what you mean by UI. If you refer to the Futon web interface
it should be enabled by default. Simply launch couchdb and go to
http://127.0.0.1/_utils in your browser.

Did you install from source/homebrew or using CouchDB X?

-Randall

Re: couchdb local.ini set up

Posted by Jarrod Roberson <ja...@vertigrated.com>.
google "couchapp"