I would like to use mongodb directly from the client-side, using javascript inside my models. I suppose this is possible since on the mongo website there is a javascript realtime console for demo.
Does exist a way to use the same api in a normal javascript application without having to write client-server glue code?
Thanks
Looks like the site uses REST-like AJAX interface, but I am certain that it does not access any MongoDB instance directly or even indirectly via some bridge.
Thinks twice before applying this pattern: how will you enforce security? Are you aware of AJAX limitations? If you really know what you are doing, the official documentation points to few useful resources:
Having a REST bridge and managing the same origin policy you can easily access MongoDB directly using AJAX calls and JavaScript.