ysbaddaden / prax

Rack proxy server for development
http://ysbaddaden.github.io/prax/
Other
475 stars 49 forks source link

Start development servers other than Rails (i.e. EmberJS) #134

Open movstox opened 8 years ago

movstox commented 8 years ago

hi and thanks for great gem,

would you please tell if it's possible to spawn the server other then rails? i.e. say i go to http://my-emberjs-app.dev and prax starts ember s instead of rails s.

if yes, would you share few tips on how i can do that? many thanks.

ysbaddaden commented 8 years ago

This is not possible with this version of Prax. It iseant to start Ruby Rack applications, and nothing else.

Since Prax serves anything from the public directory itself, it's possible to run pure frontend base applications (like Ember or Angular) but won't have the ability to start a backend app that isn't a Ruby Rack application. I have no idea what the Ember backend server is.

That being said, the crystal release of Prax has an experimental (and untested) support for starting any shell script, passing a $PORT environment variable the server must bind to. Instead of linking a directory (rack) or creating a file with a port number (port forwarding), create a shell script.

movstox commented 8 years ago

I see, thanks I'll try it. Basically, looking for a way to run ember s instead of rails s and access it via .dev subdomain if that clarifies.