0

I'm working on a MongoDB Realm application, the online function editor is not that intuitive for me, not giving the same experience with using a real IDE as we can experience with IntelliJ/Webstorm, etc.

So I exported my application and loaded it in Webstorm but since it is basically a serverless app, functions need to run on the cloud runtime. The online editor gives an integrated way of editing a function and running it with a single click, but this is obviously not available when you export your project:

enter image description here

On the cloud function editor, one way to test this method processCsv, is through the cloud console:

exports('...encodedData...') 

It will run and log the function on the same console.

There is however an Admin API that can be used to update cloud functions and trigger them. Which are good news and a possible way to integrate to an IDE like Webstorm through plugins.

The Realm Admin Function API allows

  1. Updating cloud functions
  2. Executing cloud functions

So my question would be:

  • When building an IDEA plugin would it be possible to create a mapping that will bind the source.js to a function (that will later be called)
  • Is it possible to monitor that file and there are saved changes it will automatically call the update function to push the source code changes based on the bonded function name
  • And what's the best way to build a run terminal of the plugin to actually do something like:

enter image description here

quarks
  • 33,478
  • 73
  • 290
  • 513
  • and btw, the code shown here to illustrate the idea is actually a MongoDB demo app: https://github.com/mongodb-developer/SocialStats – quarks Feb 18 '21 at 18:31
  • I'd suggest submitting this question at https://intellij-support.jetbrains.com/hc/en-us/community/topics/200366979-IntelliJ-IDEA-Open-API-and-Plugin-Development . – lena Feb 19 '21 at 11:38

0 Answers0