Mojolicious one liner to service status files with listing directory

174 views Asked by At

I am looking for Mojolicious one liner for serving static files and listing the directory by default

I come to this one liner :

perl -Mojo -E "a->static->paths(['c:\temp']);a->start" daemon

which serving static files on specific directory but its not listing the files by default , any idea if it can be changed to also list the files by default as one liner ?

1

There are 1 answers

0
simbabque On

Not a Mojo solution, but still Perl. You can use http_this to achieve the same thing. See the App::HTTPThis package.

$ http_this
Exporting '.', available at:
   http://127.0.0.1:7007/

There are also some other packages that do https, run CGI, serve files on an FTP server or even share them over WebDAV.