|
|
|
|
|
by G4Vi
1286 days ago
|
|
I would first create a script that runs a web server that performs as expected (serving files, and handling dynamic functionality in the script or in a perl module, or by paths to cgi scripts as needed). I rolled by own for packing my personal http media server (MHFS), but there's plenty of HTTP servers on CPAN. I'm not sure which one's are best. Then, I would create a custom build of APPerl using Perl::Dist::APPerl 's apperlm and modifying the apperl-project.json to pack in the script, CPAN modules, cgi files, and the static resources into a APPerl binary. When bundled into APPerl, the script can read the files embedded in APPerl from the /zip path. Perl::Dist::APPerl (with tutorial on building apps): https://metacpan.org/pod/Perl::Dist::APPerl MHFS's APPerl packaging config: https://github.com/G4Vi/MHFS/blob/master/apperl/apperl-proje... |
|
Same. I know about HTTP::Daemon, HTTP::Tiny and HTTP::Server::Simple
If you have tried one of the 3 and can confirm it works with APPerl, it might save time?
If not, first with HTTP::Daemon (since it shows how to bind to a given IP in https://gist.github.com/mikkun/6388508, unlike HTTP::Tiny) I will try to release something similar to redbean but based on perl and DBD::SQLite
> When bundled into APPerl, the script can read the files embedded in APPerl from the /zip path.
That much I knew, but I was afraid there might be extra things needed
> MHFS's APPerl packaging config: https://github.com/G4Vi/MHFS/blob/master/apperl/apperl-proje...
Thank you! Then I might go with MHFS at first (tweaking its index.pl), if only because it's been tested by you with APPerl :)