< isolate_arg([$:,$ |T], L) ->
{httpd_util:to_lower(reverse(L)), T};
---
> isolate_arg([$:,$ |T], L) ->
{string:to_lower(reverse(L)), T};
Plus, working on Windows, I had to convert the launcher script into theexpose_folder.cmd:
@echo off
SET PA=c:\src\web_server
SET PORT=4501
SET ERL="C:\Program Files\erl5.7.1\bin\erl.exe"
SET HOSTNAME=hostname
if %1. EQU start. (
%ERL% -boot start_sasl -sname webserver001 \
-pa %PA% -heart -detached -s web_server start %port%
) else ( if %1. EQU debug. (
%ERL% -sname webserver001
-pa %PA% -s web_server start %PORT%
) else ( if %1. EQU stop. (
%ERL% -noshell -sname webserver_stopper
-pa %PA% -s web_server stop webserver001@%HOSTNAME%
echo "Stopping Webserver"
) else (
echo "Usage: expose_folder.cmd {start|stop|debug}" )))
- adjust the paths in this script
- put this script into the folder, listed in the PATH environment variable
- Go to folder which you want to web-enable
- run the expose_folder.cmd start
- start browsing your folder
- stop it using: expose_folder.cmd stop
No, I don't want to carry the whole CEAN over and yes, MochiWeb is very cool, but is still a bit too large for my purposes.
Why "they" can store the tiny Ruby file into any folder to make it the web-enabled, and "we" cannot?
require 'webrick'
include WEBrick
s = HTTPServer.new(:Port => 9090,
:DocumentRoot => Dir::pwd )
trap("INT"){ s.shutdown }
s.start
Yes, I can work it out for myself, but this is the wheel to re-invent. The official Erlang distro might have it to make the whole Erlang experience much more fun and right away!