A CMIS javascript library for node and browser
Since version 0.3.0 The API for CmisSession.setContentStream() and CmisSession.appendContentStream() has changed. Please refer to the documentation for details.
$ npm install cmis
$ node
> var cmis = require('cmis');
$ bower install cmis
You can include directly minified version with dependencies:
<!-- do not use in production -->
<script src="https://rawgit.com/agea/CmisJS/master/min/cmis.min-all.js"></script>
The entry point for all CMIS operation is the CmisSession
var url = '/alfresco/cmisbrowser';
Note: you may specify an absolute url if running in node, or using CORS
var session = cmis.createSession(url);
You may specify your credentials
session.setCredentials('admin','admin');
All session methods which connect to a repository are asynchronous, and return a CmisRequest object.
You may take a look at the tests to see some usage examples:
https://github.com/agea/CmisJS/blob/master/test/spec.js
API docs are available here: http://agea.github.io/CmisJS/docs/
Install grunt:
$ npm install -g grunt-cli
Clone the repo:
$ git clone https://github.com/agea/CmisJS/
Install dependencies:
$ cd CmisJS
$ npm install
(http://cmis.alfresco.com will be used as test repository)
$ grunt test
You can specify different url, username and password
$ grunt test --url http://localhost:8080/alfresco/cmisbrowser --username admin --password secret
$ grunt server
Visit http://localhost:9000/test in the browser.
Grunt will act as a proxy for http://cmis.alfresco.com, you can specify a different server:
$ grunt server --host localhost --port 8080 --path /alfresco/cmisbrowser
To change username and password you can specify them in the url
http://localhost:9000/test?username=admin&password=secret
##License
MIT license - http://www.opensource.org/licenses/mit-license.php