Walter
Walter

Reputation: 23

Unable to reference other JS code after migrating Parse

After migrating from Parse.com to Parse Server on Heroku, I am unable to run cloud-code like this:

 var foo = require('cloud/test.js')

Before switching, this worked fine.

Upvotes: 0

Views: 88

Answers (2)

Walter
Walter

Reputation: 23

it turns out:

 require('./test.js') 

is the correct way to do this (due to server on heroku being linux based, as I was told)

Upvotes: 0

Jake T.
Jake T.

Reputation: 4378

Try getting rid of the 'cloud/' part. If your js files are in the same directory, you should not need to include it. Doing so was a Parse thing.

Upvotes: 0

Related Questions