Advertisement
Guest User

Untitled

a guest
Mar 17th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. var nuxeo = require('nuxeo');
  2.  
  3. var client = new nuxeo.Client({
  4. auth: {
  5. username: 'Administrator',
  6. password: 'Administrator'
  7. }
  8. });
  9.  
  10. client.document('/')
  11. .fetch(function(error, doc) {
  12. if (error) {
  13. // something went wrong
  14. throw error;
  15. }
  16.  
  17. doc.set({ 'dc:description': 'An updated description' });
  18. doc.save(function(error, doc) {
  19. console.log('Successfully updated ' + doc.title + ' with new description: ' + doc.properties['dc:description']);
  20. });
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement