Search code examples
ember.jscloud9-ideportslumen

Serving Ember and Lumen From Cloud 9 Workspace


I'm testing out Cloud 9 and am running into an issue with ports. According to C9 docs ports I can bind to are 8080, 8081 and 8082. I've created a sample Ember app that's being served via ember-cli on port 8080, and when I visit it via <workspace>-<username>.c9.io:8080 everything works fine.

I'm also trying to serve a test Lumen application as an API server for this simple app on port 8081 using php artisan serve --port 8081. Testing API calls via wget on terminal in C9 works, but I can't access the server via <workspace>-<username>.c9.io:8081 and proxying to http://localhost:8081 via .ember-cli config file results in ECONNREFUSED errors.

Do I need to enable or modify something else in my C9 workspace to run this properly in a single workspace?


Solution

  • Please ensure Lumen is binding to port 0.0.0.0. If it's binding to 127.0.0.1 it won't be externally accessible.