I want to run a Javascript/PHP application on my laptop which will at
times be unable to get to the internet. Thus I need to run a web
server of some sort on it to serve the PHP side of things.
If the laptop is at home on the home LAN I want to be able to run the
same Javascript/PHP application on my desktop machine so I can use the
bigger screen etc. This will work fine of course with the web server
on the laptop, as long as the web server is running.
What's the neatest/easiest way to fire up the web server on demand? I
don't really want to run it all the time. Ideally also I'd prefer not
to run Apache as it's total overkill for what I'm doing. I tried
PHP's built-in web server ("php -S localhost:80") and it works fine
for me, the home LAN can't be accessed from outside so security should
be OK.
I suppose the modern equivalent of inetd would do what I want but I'm
a bit worried about how easy it might be (or not).
--
Chris Green