javascript - MongoDB 有本地 REST 接口(interface)吗?

标签 javascript mongodb rest

我目前正在评估 Mongo 和 CouchDB 用于存储数据点(分析)。

在我之前与 CouchDB 的交互过程中,我喜欢它基于 JSONP 的界面。我可以从纯 JavaScript 执行所有 CRUD 操作。 只需运行 CouchDB 并编写一些 JavaScript - 不需要服务器端组件。

当将此与 Mongo 进行比较时,是否有任何可用的 REST 接口(interface)? 是否可以在 Mongo 中纯粹通过 javascript 进行 CRUD?

谢谢!

最佳答案

MongoDB 没有成熟的 REST 接口(interface),主要是因为服务器使用原生二进制协议(protocol)来提高效率。您可以在官方 documentation 中找到一些 REST 包装器(编辑:MongoDB 公司现已删除此信息):

  • RESTHeart (Java 8) is a the data REST API server part of the MongoDB ecosystem. RESTHeart uses a standard representation format based on HAL with full native mongodb data support via the strict mode representation of BSON. It provides API for CRUD and data model operations, built-in authentication and authorization and it supports CORS. It is easy to setup and a docker container is available. RESTHeart is also fast and lightweight (~7 Mb footprint and ~200 Mb RAM peek usage).
  • Sleepy Mongoose (Python) is a full featured REST interface for MongoDB which is available as a separate project.
  • Simple REST Interface The mongod process includes a simple read-only REST interface for convenience. For full REST capabilities we recommend using an external tool such as Sleepy.Mongoose.

关于javascript - MongoDB 有本地 REST 接口(interface)吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7386740/

相关文章:

javascript - 修复谷歌浏览器上的蓝线

javascript - HTML2Canvas:无法在克隆的 iframe 中找到元素

javascript - "getContext is not a function"为元素选择器使用变量时

node.js - 在 Mongoose 中更新嵌套对象

javascript - 是否可以使用 javascript 检查 Firefox DNT 的值?

mongodb - Mongo Shell - 控制台/调试日志

java - postman 如何将 ArrayList 中的 map 数据作为表单数据发布

java - 在 REST 调用中使用 Wicket

java - Apache Sling "more REST"比 Spring-mvc 是什么意思?

java - REST Controller 中 RequestParam 的正确方法