Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mojolicious one liner to service status files with listing directory

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 ?

like image 597
dave Avatar asked Oct 05 '20 09:10

dave


1 Answers

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.

like image 129
simbabque Avatar answered Oct 05 '22 06:10

simbabque