-2

How would I go about starting to write server code using node js, and be able to utilize it through my parse server managed app.

Similar to what cloudCode does, expect that I want to use nodejs, and Parse state that "cloudCode is not nodejs".

Is it as simple as writing a nodejs module and redirecting requests and data to it, and send back information?

If there is a tutorial or something that I can start with, that will be great!. Thank you!

user3676224
  • 863
  • 2
  • 11
  • 25
  • Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, [describe the problem](http://meta.stackoverflow.com/questions/254393/what-exactly-is-a-recommendation-question) and what has been done so far to solve it. – Fabio Antunes Jun 02 '16 at 15:31

1 Answers1

2

If you want your Parse-Server-based code to call your regular express JS modules (maybe defined inside a route file), then that would mean requiring the express JS defined module (i.e. require('./path/to/modulefile') ) in the CloudCode functions definition file, and then calling the methods and properties you've defined in the module.

If, on the other hand, you want your express JS modules to use functionalities you've defined in your CloudCode file (which should be by default in './cloud/' directory), then, within your express JS module (maybe inside a route file, etc), you can use Parse.Cloud.run('functionDefinedInCloudCodeFile', {parametersToBePassed}); to invoke the functionality you want.

Hope that helps.

Ugo
  • 587
  • 8
  • 12
  • it does help, and now i find myself in need of using parse cloud coding, and i need a parse account for that, but i they stopped accepting accounts. how do i get around this issue? – user3676224 Jun 10 '16 at 15:27