-
Installation
npm install moralis-admin-cli -g
npm install
-
Env
Create a .env file in root with these properties:
MORALIS_CLI_SECRET_PROD=<insertProdSecret>
MORALIS_CLI_KEY_PROD=<insertProdApiKey>
MORALIS_CLI_SECRET_DEV=<insertDevSecret>
MORALIS_CLI_KEY_DEV=<insertDevApiKey>
-
Usage
Code & Typescript files located in /src/ Webpack is used for building a single .js file into /dist/ which will be uploaded to moralis cloud code server.
User provided scripts:
webpack-watch (builds the /src/ and watches for changes)
watch-logs (outputs logs of your moralis cloud code server)
cloud-upload (watches for changes of /dist/ and uploads to cloud code server)
Check out the working sample code inside /src/ for Moralis library usage in this project.
Moralis Cloud Code Docs: https://docs.moralis.io/moralis-server/cloud-code
Have fun coding