I am currently setting up Parse Cloud Code and I have gotten to the final step which is to deploy the main.js file but when I do this it just opens the file in Adobe Dreamweaver?
I was having problems understanding how to deploy the main.js file.
Read the following steps: https://www.parse.com/apps/quickstart#cloud_code/unix
It contains:
Get the Parse tool
Download the command line tool by running this command:
curl -s https://www.parse.com/downloads/cloud_code/installer.sh | sudo /bin/bash
This installs a tool named parse to /usr/local/bin/parse. That is the only thing that's added, so to uninstall, just delete that file. Running this command will also update your existing Parse command line tool if you already have it installed.
Set up a Cloud Code directory
Open a new terminal window, run the command parse new and follow the instructions.
$ parse new
Please login to Parse using your email and password.
Email: ninja#gmail.com
Password (will be hidden):
Would you like to create a new app, or add Cloud Code to an existing app?
Type "new" or "existing": existing
1:MyApp
2:MyOtherApp
Select an App to add to config: 1
Awesome! Now it's time to setup some Cloud Code for the app: "MyApp",
Next we will create a directory to hold your Cloud Code.
Please enter the name to use for this directory, or hit ENTER to use
"MyApp" as the directory name.
Directory Name: MyCloudCode
Your Cloud Code has been created at ${CLOUD_CODE_DIR}.
Next, you might want to deploy this code with
"parse deploy"
.
This includes a "Hello world" cloud function, so once you deploy
you can test that it works, with:
curl -X POST \
-H "X-Parse-Application-Id: ${APP_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{}' \
https://api.parse.com/1/functions/hello
$ cd MyCloudCode
Go to the directory where your Main.js file does exist and
use command $parse deploy to deploy your code on parse cloud.Refer this link if you are using Linux system.https://www.parse.com/apps/quickstart#cloud_code/unix and use this link if you are using windows system https://parse.com/apps/quickstart#cloud_code/windows.
Hope it will help.
As far as I understand from your question, you want to deploy the main.js file to the Parse cloud. The problem that you face opening in Adobe Dreamweaver is related with your computer where you configure the file open with the Adobe Dreamweaver.
The answer to your question is; as detailed in Parse Cloud tutorial, first you have to install Parse command line tool. This tool enables you to manage your code in Parse cloud. Then you can use "parse new" command to set up a cloud directory where you have to replace the main.js file with your own. Following that "parse deploy" will deploy your js file to the Parse cloud. You can find detailed information in tutorials Parse Cloud. Hope this helps.
Regards.
Related
I tried the following steps but when I access my application in the browser using the url link, it returns a blank page. Here is what I did:
Copy My jar file to /home/ec2-user/
cp myApp-0.0.1-SNAPSHOT.jar /home/ec2-user
Next, I opened the rc.local in the VI editor and appended myApp-0.0.1-SNAPSHOT.jar
vi /etc/rc.local
#
#
#
#
touch /var/lock/subsys/local
//Append the below command:
java -jar /home/ec2-user/myapp-0.0.1-SNAPSHOT.jar
/:wq
Give permission to the symlink by running the following command:
chmod +X /etc/rc.d/rc.local
So I stopped my ec2 instance and after a while, I started it again to see if I was able to test my endpoints without having to manually run my appl with java -jar myApp-0.0.1-SNAPSHOT.jar But it did not succeed. I was told this way of doing is now obsolete. I also tried to follow the following link but the file naming was not obvious to me so I messed up some steps and got to the same result: failed Please can anyone direct me? Thanks! I tried the following steps but when I access my application in the browser using the url link, it returns blank page.
The BOT works, but I can't deploy it to Azure using the CLI instructions here.
https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-deploy-az-cli?view=azure-bot-service-4.0&tabs=csharp#option-1-existing-app-service-plan
Here are my relevant CLI commands.
az bot prepare-deploy --lang Csharp --code-dir "./Source/Repos/MyBot.Bot/MyBot.Bot" --proj-file-path "C:\Users<username>\Source\Repos\MyBot.Bot\MyBot.Bot\MyBot.Bot.csproj"
az webapp deployment source config-zip --resource-group "BOTQnARG" --name "MYBOTAPP" --src "C:\Users<username>\Source\Repos\MyBot.Bot\MyBot.Bot\Data.zip" --timeout 3600
When I include a .deployment file in the Bots root directory zip file, I get this error message in Deployment Center (Preview) for the App Service. I also get a Zip Deployment Failed message in the Command Prompt window.
Using the following command to generate deployment script: 'azure site deploymentscript -y --no-dot-deployment -r "D:\local\Temp\zipdeploy\extracted" -o "D:\home\site\deployments\tools" --aspNetCore "C:\Users<username>\Source\Repos\MyBot\MyBot\MyBot.csproj"'.
D:\Program Files (x86)\SiteExtensions\Kudu\91.21119.4922\bin\node_modules\kuduscript\lib\generator.js:90
throw new Error("The project file path should be a sub-directory of the repository root"); } ;
^
Error: The project file path should be a sub-directory of the repository root
Here is a sample of what my root directory for the BOT looks like.
BEG UPDATE 1
I removed the . in the Project name and folders, but it still didn't work.
Here is my .deployment file.
[config]
SCM_SCRIPT_GENERATOR_ARGS=--aspNetCore "C:\Users\<username>\Source\Repos\MyBot\MyBot\MyBot.csproj"
END UPDATE 1
Any idea what's happening and how to work around this?
I finally got it to work. The .deployment file should look like this. I used Notepad++ to edit it.
[config]
SCM_SCRIPT_GENERATOR_ARGS=--aspNetCore "MyBot.csproj"
When you run the following command, it adds unnecessary information to the file.
az bot prepare-deploy --lang Csharp --code-dir "./Source/Repos/MyBot/MyBot" --proj-file-path "C:\Users\<username>\Source\Repos\MyBot\MyBot\MyBot.csproj"
I have been searching day and night for a way to set email verification for my app with its server on Bitnami Parse Server(EC2). To no avail! All I could find was a client asking me to shift my app to back4App. But to switch my app to back4App only because I have no solution to email verification is ridiculous which is why i am stalling. Help Please!
I am looking for a tutorial or some detailed guide. I am not at all sure on how to download parse server mailgun.
Did you enable HTTPS? Could you check this post? It might help you setting it up:
https://community.bitnami.com/t/parse-email-verification-issue/53354/
Access your server via Putty.
In the terminal go to directory htdocs by using command
$cd /opt/bitnami/apps/parse/htdocs.
Here you will find one file package.json.
Open the file using vi and see whether it contains something or not
If it is empty then add {} to your package.json file
save it and run
$npm install #parse/simple-mailgun-adapter --save
After this open your server.js file set up your emailAdapter with appName and publicserverurl.
After this add this line to your server.js file
verifyUserEmails: true
This error appears on Elastic Beanstalk after uploading (with a zip) a new version to Elastic Beanstalk! with a file .ebextensions/singlehttps.config that sets the https for a single instance server.
If you're doing the Amazon AWS workshop LAB:
https://github.com/awslabs/eb-node-express-signup
ie. Upload and Deploying your Elastic Beanstalk app
and getting this PROBLEM error:
*ERROR Failed to deploy application.
*ERROR The configuration file __MACOSX/.ebextensions/._setup.config in application version 1.1.0 contains invalid YAML or JSON. YAML exception: Invalid Yaml: unacceptable character '' (0x0) special characters are not allowed in "", position 0, JSON exception: Invalid JSON: Unexpected character () at position 0.. Update the configuration file.
*INFO Environment update is starting.
SOLUTION
This is because MACOS includes some extra hidden folders which you need to exclude from your ZIP file. To do this, run this command in terminal on your zip:
$ zip -d nameofyourzipfile.zip __MACOSX/\*
Now re-upload, and you should get a success message:
INFO Environment update completed successfully.
INFO New application version was deployed to running EC2 instances.
Hope this solved your issue!
The reason for this problem in the Elastic Beanstalk system was in fact in the zip that is created in the Mac osx platform.
if you upload the new version with eb deploy command and not by zipping the application, then the problem doesn't appear!
Hope this helps someone, as it has been troubling me for so long!!
When you zip folders on MACOSX, it will add its own hidden files in there alongside yours.
If you want to make a zip without those invisible Mac resource files such as “_MACOSX” or “._Filename” and .ds store files, use the “-X” option in the zip command
$ zip -r -X archive_name.zip folder_to_compress
If this is a pre-existing zip file, you can use the command others here have mentioned
$ zip -d nameofyourzipfile.zip __MACOSX/\*
Work around on Mac
Since it opens up the zip file and when you compress it, Elastic Beanstalk gives the error mentioned above. If you run command in previous comments to remove MACOSX related stuff, it still gave me an error about one of the files not found.
Workaround is that before doing the download, rename the zip file to some other extension and change to zip once its on the Mac.
When you upload this file to Elastic Beanstalk, it will work fine.
I've created a PHP script that generates a local.xml file for Magento with the required database settings and credentials. I need to run this after the application is deployed; however I cannot seem to figure out a way to do so. My understanding is that I need to create a .config file inside of a .ebextensions directory. Anyone have a solution?
Technically Josh is not correct. According to the documentation (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#customize-containers-format-commands): the commands section .. "The commands are processed in alphabetical order by name, and they run before the application and web server are set up and the application version file is extracted."
The closest I am aware of is the "container_commands" section which "The commands in container_commands are processed in alphabetical order by name. They run after the application and web server have been set up and the application version file has been extracted, but before the application version is deployed."
I don't know of a way to truly run a script post deployment (which is why I was here looking for that answer).
Elastic Beanstalk will look files under /opt/elasticbeanstalk/hooks/appdeploy/post directory to run after deployment.
So you can make use of this and do:
commands:
create_post_dir:
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post"
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/job_after_deploy.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
/var/app/current
** run your php script here **
Yup, .ebextensions are what you are looking for. To see how to bundle the source, take a look at the sample applications. There is a PHP one you can look at as well.
For more info on .ebextensions, take a look at this page.
Here's an example of a custom command. This could go in a file called sample.config within the .ebextensions directory:
commands:
success_command:
command: echo "this will be ran after launching"
Be careful if you copy and paste YAML and double check the format. You can also use JSON which follows the similar format.