Platform.api not working in NodeJS scripts to access Mongo


#1

I’m trying to issue a request from a NodeJS service in DF 2.2.1 like platform.api.get("mongodb/_table/myTable") but the script seems to crash without any other clue but returning the message "Executed command returned with error code: 1"

I understand that platform.api.get() is supported in NodeJS, right?

Any idea why this may happen?

Thanks in advance.


#2

Ok, I found the problem: NodeJS syntax is different from V8 and the data is received via callback.

For examples, see http://wiki.dreamfactory.com/DreamFactory/Tutorials/Node_platform_api_crud