You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all excuse me as I didn't find another way to share this, but I consider it may be useful for your parse-server applications.
I created an addon called parse-server-addon-cloud-class, available now on npm, which helps you organize and extend your parse-server's Cloud Code. Please check the repo here: https://github.com/owsas/parse-cloud-class
With this module you can easily:
Define minimum values for keys on your classes
Define maximum values
Define default values
Define required keys
Define immutable keys (only editable with the master key)
Use addons to easily extend the funcionality of your app
Create new addons and share them with the community
Customize the default behaviour to your own needs
Classes
It helps you organize your code for each of your Parse classes, like so:
// GamePoint.jsclassGamePointextendsParseCloudClass{requiredKeys=['player'];// All points must have a playerminimumValues={credits: 10,// minimum ammount of 10 credits can be earned}maximumValues={credits: 100,// limit the ammount to maximum a 100 credits }defaultValues={credits: 20,// by default, give 20 credits}asyncafterSave(request){constobj=awaitsuper.afterSave(request);// log something to Google Analytics ...returnobj;}}module.exports=GamePoint;
Using
After writing your classes that extend ParseCloudClass, you can import and use them in your Cloud Code's main.js file, like this:
This way, every GamePoint element will run your custom code using ParseCloudClass.
Addons
You can create your own addons or use community created ones to extend the functionality for your classes. This may open your parse-server for new integrations. For example, using Google Analytics on afterSave, logging errors to an error tracking service, replicating your data to any database or running your custom business logic.
// main.js// with typescript or ES6import{ParseCloudClass}from'parse-server-addon-cloud-class';// import a community created addonimport{SomeAddon}from'some-addon-module';// Create the instanceconstmyConfig=newParseCloudClass();// use the addonmyConfig.useAddon(SomeAddon);// you can use any number of addonsmyConfig.useAddon(SomeOtherAddon);// Configure your class to use the configurationParseCloudClass.configureClass(Parse,'MyClass',myConfig);
I don’t know but not this one. We use github issues for tracking issues, as mentioned in all issues templates.
There is a gitter where some users discuss, as exposed in the README, then blog, articles, SEO are other ways to reach ou to people. But this is not one.
Hello!
First of all excuse me as I didn't find another way to share this, but I consider it may be useful for your
parse-server
applications.I created an addon called
parse-server-addon-cloud-class
, available now on npm, which helps you organize and extend yourparse-server
's Cloud Code. Please check the repo here: https://github.com/owsas/parse-cloud-classWith this module you can easily:
Classes
It helps you organize your code for each of your Parse classes, like so:
Using
After writing your classes that extend
ParseCloudClass
, you can import and use them in your Cloud Code'smain.js
file, like this:This way, every GamePoint element will run your custom code using
ParseCloudClass
.Addons
You can create your own addons or use community created ones to extend the functionality for your classes. This may open your
parse-server
for new integrations. For example, using Google Analytics onafterSave
, logging errors to an error tracking service, replicating your data to any database or running your custom business logic.If you like it, give parse-server-addon-cloud-class a star 😄
The text was updated successfully, but these errors were encountered: