Mojolicious one liner to service status files with listing directory
Asked Answered
S

1

8

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 ?

Sopher answered 5/10, 2020 at 9:48 Comment(0)
P
6

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.

Pelkey answered 5/10, 2020 at 10:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.