mojo generate app --Create a Mojolicious template
You can use the mojo generate app command to create a Mojolicious template.
mojo generate app application name
This is a sample to create an application called Myapp. It is recommended and customary for Perl module names to start with an uppercase letter, so it is recommended that all application names be uppercase at the beginning and lowercase after that.
mojo generate app Myapp
The output is as follows, and the "myapp" directory is created. The application name and directory are in lowercase, and the module name is the same as the application name.
[mkdir] / home / kimoto / labo / tmp / myapp / script [write] / home / kimoto / labo / tmp / myapp / script / myapp [chmod] / home / kimoto / labo / tmp / myapp / script / myapp 744 [mkdir] / home / kimoto / labo / tmp / myapp / lib [write] /home/kimoto/labo/tmp/myapp/lib/Myapp.pm [exist] / home / kimoto / labo / tmp / myapp [write] /home/kimoto/labo/tmp/myapp/myapp.conf [mkdir] / home / kimoto / labo / tmp / myapp / lib / Myapp / Controller [write] /home/kimoto/labo/tmp/myapp/lib/Myapp/Controller/Example.pm [mkdir] / home / kimoto / labo / tmp / myapp / t [write] /home/kimoto/labo/tmp/myapp/t/basic.t [mkdir] / home / kimoto / labo / tmp / myapp / public [write] /home/kimoto/labo/tmp/myapp/public/index.html [mkdir] / home / kimoto / labo / tmp / myapp / templates / layouts [write] /home/kimoto/labo/tmp/myapp/templates/layouts/default.html.ep [mkdir] / home / kimoto / labo / tmp / myapp / templates / example [write] /home/kimoto/labo/tmp/myapp/templates/example/welcome.html.ep
A brief explanation of the directory structure
public
A directory of static files.
templates
Template file directory.
lib
The directory where the library is placed.
myapp.conf
This is the application configuration file.
myapp
Mojolicious application. morbo to boot on the development server, hypnotoad to boot on the production server Use (hyphenotod).
Development server
morbo myapp
Production server
hypnotoad myapp