Search code examples
javascriptnode.jsmongodbaffdex-sdk

Is it possible to use affdex-sdk in node.js and save emotion data to mongodb?


I find the examples for affdex javascript sdk use the sdk in the frontend webpage.
Is it possible to use the sdk in Node.js? I'd like to save the emotion data to MongoDB.
Or can I pass the emotion data I get in the fronend to Node.js in the backend? Then save the data from Node.js to MongoDB?
According to the documentation, the CameraDetector constructor expects four parameters { divRoot, width, height, faceMode }. Which means I need to include a div element. But Node.js cannot manipulate frontend elements natively.


Solution

  • The current published version of the SDK cannot be used from NodeJS .. Not because it needs a DOM, but because internally it uses MEMFS to load the expressions models.