简体   繁体   中英

How to deploy cloud code on AWS hosted Parse server

I am new to AWS elastic beanstalk. I have deployed the Parse example server using deploy to AWS button in the Parse Server Example Link . I want to update the cloud code in main.js but I don't know how can I deploy the cloud code the way I was deploying with Parse in terminal.

Try this command:

eb deploy

It will zip your repository, upload to S3 and deploy to eb.

Get the CLI tool: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html

You need to have the Parse Server Example locally on your machine. Then, setup the EB CLI tool in that folder so that you can deploy using the eb deploy .

Make sure that you indicate to the ParseServer in index.js that you want CloudCode enabled:

var api = new ParseServer({
  ...
  cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
  ...

I am using environment variables for configuration of the path.

To update your Parse Cloud Code there is "cloud" folder in the file structure that contains a main.js file. Paste your existing Cloud Code into this file and then deploy the update to AWS. This is all I had to do for mine and it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM