Today we will focus on a simple task: listing the files contained in a directory, sort them by modification time (mtime) and display the result in a JSON array. We are gonna use Mojo::File for the file system part and Mojolicious::Lite to expose those data on a simple but effective JSON API. Prerequisites apt install libmojolicious-perl touch mtime.pl && chmod +x mtime.pl The code Our lite application is separated in two main parts: