Nodejs 中的 WOPI 主机实现?

WOPI host implementation in Nodejs?

我想部署Office Online,需要实现WOPI协议。我已经在 C# 中看到了 WOPI 主机的实现,例如here。 WOPI 协议需要实现一堆端点。我想知道如果我在 Node.js 中实现 WOPI 主机,它是否与 Office Online Server 兼容?

有什么想法吗?

感谢期待

所讨论的语言无关紧要,只是 "REST"。我前段时间在Ruby写了一个实现

WOPI 主机端点的实现与语言无关。只要您的 language/framework/platform 可以通过 application/jsonapplication/octet-stream 响应为 HTTP 请求提供服务,您就可以了。

您至少需要实现 MS-WOPI protocol. Depending on your requirements you may also need to implement the MS-FSSHTTP protocol. This may be the case when you are integrating with Office Web Apps 2013,并且您需要支持 Word 编辑等功能。发现 XML.

中的 COBALT 表明了使用 MS-FSSHTTP 的必要性

Office Online Server removed the requirement for implementing COBALT requests from most of the actions. It's only required for OneNote file format. You can see that in the discovery XML of Office Online.

除非您是 Office Online integration partner,否则测试您的 WOPI 实施的唯一方法是在您的服务器上本地安装 Office Online Server(或较旧的 Office Web Apps)。两者都可以通过 MSDN 下载。

如果您是集成合作伙伴,那么您可以利用 validator app they provide. There is a CLI built in python available on GitHub

如果您要与新的 OOS 集成,请参阅 http://wopi.readthedocs.io/ 上更新更好的文档。

这是我用 node 和 express 编写的 WOPI 服务器的示例实现:https://github.com/mikeebowen/node-wopi-server