This is a sample implementation of the WOPI Protocol written with in TypeScript with Node.js.This is not a complete implementation, but is meant to be a example for implementers to use to get started or for reference.
This server can be validated with the WOPI Validator Core or will work as a live WOPI Server if the computer running the WOPI Server is part of an active directory domain with a server running Office Online Server.
- NodeJS 14+
- Computer running WOPI Server must be part of an Active Directory domain
- Office Online Server running on the same domain as the WOPI Server
-
Clone the repo
-
Run
npm installfrom the root of the project -
In the root of the project create a file called
.envand copy theexample.envfile contents to it, then edit it-
OFFICE_ONLINE_SERVERthe url with protocol -
For Example, if you get hosting/discovery from
http://my-oos/hosting/discoverythen use:OFFICE_ONLINE_SERVER=http://my-oos
-
WOPI_IMPLEMENTEDa comma separated list of WOPI Methods. The server currently is capable of view, open, and edit. With those methods use:WOPI_IMPLEMENTED=view,open,edit
-
WOPI_SERVERthe url with protocol of your WOPI Server. It must be reachable from your Office Online Server. localhost will only work WOPI Validator Core not with actual files.-
So if you view the WOPI Client from http://my-wopi-server:3000 then use:
WOPI_SERVER=http://my-wopi-server:3000
-
-
To run the server enter npm start from the root of the project. Or if you use VS Code, press f5 to use the debugger.