RedbeanPHP code for NodeJS