Last active
August 29, 2015 14:00
-
-
Save AbeHaruhiko/11451887 to your computer and use it in GitHub Desktop.
Parse.comのホスティングを利用する ref: http://qiita.com/AbeHaruhiko/items/34e289e675043207482b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -s https://www.parse.com/downloads/cloud_code/installer.sh | sudo /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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: MyApp1 | |
2: MyAwesomeApp2 | |
3: app | |
Select an App to add to config: 2 | |
Awesome! Now it's time to setup some Cloud Code for the app: "MyAwesomeApp2", | |
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 "MyAwesomeApp2" as the directory name. | |
Directory Name: MyWebsite | |
Your Cloud Code has been created at /Dir/of/MyWebsite. | |
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: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ | |
-H "X-Parse-REST-API-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ | |
-H "Content-Type: application/json" \ | |
-d '{}' \ | |
https://api.parse.com/1/functions/hello | |
$ cd MyWebsite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-config/ | |
global.json | |
-cloud/ | |
main.js | |
-public/ | |
index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ parse deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{サブドメイン名}.parseapp.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment