I just migrated the Parse Server and everything works except the cloud code. I came to understand that this is because in my main.js I need the Underline library.
This is my cloud code feature:
Parse.Cloud.define("ReadyUp", function(request, response) { var _ = require('underscore'); var fbid = request.user.get("fbid"); var query = new Parse.Query("Spel"); query.equalTo("lobby", fbid); query.find().then(function(results) { _.each(results, function(spel) { spel.addUnique("ready", fbid); }); return Parse.Object.saveAll(results); }).then(function(result) { response.success(result); }, function(error) { response.error(error); }); });
This code worked without errors before porting. I assume the requirement does not find the desired folder. To create a folder structure, it looks like this:
Cloudcode Location: mainfolder-> cloud-> main.js
Subtree library: Main folder -> node_modules -> underline (folder)
Is the code broken or the folder structure damaged?
Thanks in advance!
/ Martin
source share