gpt4 book ai didi

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

转载 作者:IT老高 更新时间:2023-10-28 11:08:05 25 4
gpt4 key购买 nike

我目前正在评估 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com