Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I did my own exploration of this question and I think I found a solution which will allow me having one web-server running all my tiny apps at once.</p> <p>It is based on <strong>RackStack</strong> not-yet-a-gem created by Remi Taylor (<strong>@remi</strong> on Github) <a href="https://github.com/remi/rack-stack">https://github.com/remi/rack-stack</a>.</p> <p>RackStack is inspired by Rack::Builder, which as well seems being good for accomplishing a task like this - RackStack just goes in the same direction further, abstracting "stack" functionality in a way I found very nice and handy.</p> <p>Here is a demonstration of RackStack which consists of two sample apps (Sinatra and Rack): <a href="https://github.com/stanislaw/skeletons/tree/master/rack_stack">https://github.com/stanislaw/skeletons/tree/master/rack_stack</a>. To mimic stack app behavior on a real server I modified my /etc/hosts file to have localhost2 host pointing to 127.0.0.1.</p> <p>I fire up Thin server and then run requests on localhost or localhost2: the requests to 'localhost' are served by FirstApp, to 'localhost2' by SecondApp. </p> <p>I can't now foresee any problems that can appear, when I will test my apps on a real server, but now this approach seems to be exactly what I was looking for: I imagine, that on a real server Nginx will pass requests to all the hosts associated with my rack apps to a socket listened by Thin server. So, RackStack will meet only those requests which are addressed to the apps I have in my stack.</p> <p>Any suggestions, improvements of this scheme or alternatives are still appreciated!</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.
    3. 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