I'm trying to write a web application using nodejs and couchdb. In couch i store content of my seperates page. What is my problem..
i would have a nice urls like this:
http://mypage.com/content/1/blabla-detail.html
http://mypage.com/content/2/blabla-detail.html
http://mypage.com/content/5/blabla-detail.html
http://mypage.com/content/n/blabla-detail.html
generally
http://mypage.com/content/{OID}/blabla-detail.html
so i need some kind like a autoincrement in couchdb. Offcourse i can use a _id - it is a unique in couchdb but ... uuid in couch is long hash ... i don't want this long hash in my urls :( i looking some unique but short values.
I just thinking about creating view to get count of all rows in documents but ... what in case when at this same time few user will save a new element. There will be problem - couchdb has not a transaction.
I'm stuck.
Can anyone help me to resolve this problem ?