What would be the advantage of Moralis Cloud Functions over Express.js + Moralis Node Package

I experienced that serving moralis cloud functions locally from vs code takes up lots of memory and I am trying to understand the benefits of using Moralis cloud functions when compared to Express.js + node Moralis package.

Hey @mkkim
Cloud functions are serverless:https://www.bmc.com/blogs/serverless-computing/#:~:text=Remember%20that%20traditional%20servers%20have,the%20servers%20for%20practical%20purposes.

If you go with Express + npm you will have to handle all the request to the server by yourself. Cloud code does not need to be hosted.

https://docs.moralis.io/moralis-server/cloud-code/cloud-functions
For complex apps, sometimes you just need a bit of logic that isn’t running on a mobile device. Cloud Code makes this possible.

Cloud Code is easy to use because it’s built on the same Moralis JavaScript SDK that powers thousands of apps. The only difference is that this code runs in your Moralis Server rather than running on the user’s mobile device. When you update your Cloud Code, it becomes available to all mobile environments instantly. You don’t have to wait for a new release of your application. This lets you change app behavior on the fly and add new features faster.

Even if you’re only familiar with mobile development, we hope you’ll find Cloud Code straightforward and easy to use.

1 Like

thanks for the reply. I was wondering if cloud functions support storing environment variables which can be accessible only in functions.

There are some config variables that you can set in dashboard.

1 Like

thanks @cryptokid can also request to external endpoint be made from cloud functions? ie) post call to Stripe api endpoint

you can make any http request from a cloud function

1 Like