NAME

Mojo::Leds - Leds aka Light Environment (emi) for Development System based on Mojolicious

github workflow tests Top language: github last commit

VERSION

version 1.11

SYNOPSIS

DESCRIPTION

Mojo::Leds is a Mojolicious app to use a filesystem similiar to classical web site

DIFFERENCES WITH MOJOLICIOUS

Mojolicious applications use a filesystem structure closer to a CPAN distribution which is not (IMHO) intuitive.

This is a classical Mojolicios applications

myapp                      # Application directory
|- script                  # Script directory
|  +- my_app               # Application script
|- lib                     # Library directory
|  |- MyApp.pm             # Application class
|  +- MyApp                # Application namespace
|     +- Controller        # Controller namespace
|        +- Example.pm     # Controller class
|- public                  # Static file directory (served automatically)
|  |- index.html           # Static HTML file
|  +- css                  # Static CSS file
|     +- example           # Static CSS for "Example" controller
|       +- welcome.css     # Static CSS for "welcome" action
|  |- js                   # Static JS file
|     +- example           # Static js for "Example" controller
|        +- welcome.js     # Static js for "welcome" action
+- templates               # Template directory
   |- layouts              # Template directory for layouts
   |  +- default.html.ep   # Layout template
   +- example              # Template directory for "Example" controller
      +- welcome.html.ep   # Template for "welcome" action

And, as you can see, the "page" welcome has its controller in lib/MyApp/Controller/Example.pm, the html code in templates/example/welcome.html.ep, the CSS code in public/css/example/welcome.css and its JS code in public/js/example/welcome.js.

In Mojo::Leds this structure is quite different

myapp                      # Application directory
|- cfg                     # Config directory
   +- app.cfg              # App config file
|- script                  # Script directory
|  +- my_app               # Application script
|- lib                     # Library directory
|  +- MyApp.pm             # Application class
|- www                     # DocumentRoot :-)
    |- public              # Static files directory (served automatically)
    |  |- index.html       # Static Home page HTML
    |  |- css              # Static CSS file
    |     + app.css        # Global Static CSS file
    |  +- js               # Static JS file
    |     + app.js         # Global Static JS file
    |- layouts
    |  +- default.html.ep  # Layout template
    +- welcome             # Welcome page: directory
       |- index.pm         # Welcome page: controller
       |- index.html.ep    # Welcome page: template
       |- index.css        # Welcome page: CSS file
       +- index.js         # Welcome page: JS file

and here, controller, html code, css and js are all inside www/example/ directory.

BUGS/CONTRIBUTING

Please report any bugs through the web interface at https://github.com/EmilianoBruni/Mojo-Leds/issues

If you want to contribute changes or otherwise involve yourself in development, feel free to fork the Git repository from https://github.com/EmilianoBruni/Mojo-Leds/.

SUPPORT

You can find this documentation with the perldoc command too.

perldoc Mojo::Leds

AUTHOR

Emiliano Bruni <info@ebruni.it>

COPYRIGHT AND LICENSE

This software is copyright (c) 2021 by Emiliano Bruni.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.