Apache and PHP
PHP with Apache is really nice to play with because you can create a random test.php
with
echo '<h1>Hello World</h1>';
and when you visit http://myserver.com/test.php it will show <h1>Hello World</h1>
My wish with Apache and JS
What I would like is to create a file test.js
with
console.log('<h1>Hello World</h1>');
and when I visit http://myserver.com/test.js it would show <h1>Hello World</h1>
What's possible currently
The nearest attempt I found was http://www.modjs.org/ but it is no longer maintained.
Meanwhile we can run a run a NodeJS instance and simulate apache with file listing and executing javascript files based on the url, but it sucks ...
Anyone knows if it's possible? :)
Thanks!