Using watch-cloud-file but i do not see code in Moralis server "Cloud Functions" screen

Hi,

@ivan

I have / example code has the server ā€œCloud Functionsā€ code in a js file and i use the method to automaticallly update the Moralis server with the command line from same directory as that js file:

moralis-admin-cli watch-cloud-file --moralisApiKey 2O...aj --moralisApiSecret ZM...bG --moralisSubdomain yj..rd.moralis.io --moralisCloudFile ./cloud-functions.js

with response:
add cloud-functions.js
File Uploaded Correctly

But when I open the ā€œCloud Functionsā€ screen of the server (via the ā€˜Cloud Functionsā€™-button) then its empty.

When i create and save a pluggin the update/save action of the server is triggerd and then the cloud function code is also visibleā€¦

Why is code initially not visible, but after a manual refresh/update or plugin save?

When i click the save button of Cloud Functions screen (with an empty Cloud Functions box / after the cli command) it shows ā€œnullā€ when i reopen the ā€œCloud Functionsā€ screen.

The moralis-admin-cli is properly installed (windows10) and I use the powerShell.

What is wrong?

first of all:
it is really not a good idea to include your --moralisApiKey & --moralisApiSecret here

secondly:
did you try to refresh your admin panel before checking the

?

for me the sync always works, but if i want to check it there i need to refresh the admin panel.

2 Likes

Right! Iā€™ve ā€˜removedā€™ the key / secret / servername ! :wink:
@ivan : How can I change this key / secret since it is equal for all my serversā€¦ :frowning: ā€¦

Ok, will do the refresh-page option.
I can imagine the server (Moralis side) can not update that browser page to that levelā€¦ so a page-refresh will help.

Ty! Have a nice Day

Your keys are different for each moralis instance - which key is the same you mean?

Ah nvm I see you mean CLI details, Iā€™ll write to the team to reset them