Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>After a few hours fiddling around, I managed to make Cloud9 IDE work for my purposes. It's a bit crafty, but here is what I did:</p> <p>Sign up on c9.io and create a workspace. The workspace has a terminal, which I used to setup the GoogleAppEngine SDK. Check which version of the SDK we need:</p> <pre><code>$ uname -a // -&gt; Linux 64 bit </code></pre> <p>Download Google AppEngine SDK for Go and unpack it</p> <pre><code>$ wget http://googleappengine.googlecode.com/files/go_appengine_sdk_linux_amd64-1.7.7.zip $ unzip go_appengine_sdk_linux_amd64-1.7.7.zip </code></pre> <p>Cloud9 IDE’s Python is 2.6.6 by default, but Google App Engine needs at least 2.7 so we need to update it.</p> <pre><code>$~/c9-c9pm-8ef422e/packages/python27-2.7.3/install.sh </code></pre> <p>The next problem is that the Go AppEngine SDK's development server is hardcoded to bind to localhost, but Cloud9 IDE disallows that. Instead they want you to bind to whatever is in the environment variables $IP and $PORT. Since the dev server is Python, nothing keeps you from changing that. Directly within Cloud9, open <code>google_appengine/google/appengine/tools/devappserver2/devappserver2.py</code>, go to line 653 and change that section to read:</p> <pre><code>options = PARSER.parse_args() options.host = os.environ['IP'] dev_server = DevelopmentServer() </code></pre> <p>I could not find a second port to use for the admin server, so I just commented it out so it would shut up - same file, line 632 and following:</p> <pre><code># admin = admin_server.AdminServer(options.admin_host, options.admin_port, # self._dispatcher, configuration, xsrf_path) # admin.start() # self._running_servers.append(admin) </code></pre> <p>And then 621:</p> <pre><code>apis = api_server.APIServer(os.environ['IP'], options.api_port, configuration.app_id) </code></pre> <p>Now you can actually run the test server without having it crash. But before you do, make a new folder <code>myapp</code> (or whatever makes you happy) and copy in the <a href="https://developers.google.com/appengine/docs/go/gettingstarted/helloworld" rel="nofollow">Go hello world app</a>. Start the dev server with:</p> <pre><code>google_appengine/dev_appserver.py myapp/ </code></pre> <p>Now your server is running, but the Cloud9 Preview window is still not hooked up to it properly. I had to try to run Apache: </p> <ol> <li>Click the little arrow right of Run in the Menu bar.</li> <li>Configure</li> <li>In the panel on the left, select some file .</li> <li>Select Apache+PHP from the drop down menu.</li> <li>Click Run. </li> </ol> <p>This should fail, because your Go dev server already runs on the IP/Port Apache want to bind to. But you did not want to use it anyways - your Preview window is now hooked up and should show <em>Hello, World!</em></p> <p>I agree this is pretty hacky - I will try to improve on the process to make it smoother- but at least it works :)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload