Skip to content

Cloud code functions not getting called #385

Description

@oyvindvol

I have set up parse-server on Heroku, but I am having trouble with the cloud code. I used the parse-server-example, and replaced the contents of main.js with my own:

console.log('##### TEST');

Parse.Cloud.afterSave('SomeClass', function(request) {
  console.log('##### INSIDE AFTER SAVE');
});

And this is my parse-server setup:

var api = new ParseServer({
  databaseURI: 'mongodb://...',
  cloud: __dirname + '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/cloud/main.js',
  appId: '...',
  masterKey: '...',
  dotNetKey: '...',
  clientKey: '...',
  fileKey: '...',
  serverURL: 'https://<appname>.herokuapp.com/parse',
  push: {
    ios: [
      {
        pfx: '....p12',
        bundleId: '<bundle-id>',
        production: false
      }, 
      {
        pfx: '....p12',
        bundleId: '<bundle-id>',
        production: true
      }
    ]
  }
});

When i run heroku logs in the terminal i can see the "### TEST" getting printed after start up. But when I save an object of the specified type, nothing is printed in the logs, so it seems that the beforeSave and afterSave isn`t getting called at all.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionSupport or code-level question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions