GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MOJO::SERVER::MORBO (3)

.ds Aq ’

NAME

Mojo::Server::Morbo - Tonight at 11...DOOOOOOOOOOOOOOOM!

CONTENTS

SYNOPSIS



  use Mojo::Server::Morbo;

  my $morbo = Mojo::Server::Morbo->new;
  $morbo->run(/home/sri/myapp.pl);



DESCRIPTION

Mojo::Server::Morbo is a full featured, self-restart capable non-blocking I/O HTTP and WebSocket server, built around the very well tested and reliable Mojo::Server::Daemon, with IPv6, TLS, SNI, Comet (long polling), keep-alive and multiple event loop support. Note that the server uses signals for process management, so you should avoid modifying signal handlers in your applications.

To start applications with it you can use the morbo script.



  $ morbo ./myapp.pl
  Server available at http://127.0.0.1:3000



For better scalability (epoll, kqueue) and to provide non-blocking name resolution, SOCKS5 as well as TLS support, the optional modules EV (4.0+), Net::DNS::Native (0.15+), IO::Socket::Socks (0.64+) and IO::Socket::SSL (1.94+) will be used automatically if possible. Individual features can also be disabled with the MOJO_NO_NDN, MOJO_NO_SOCKS and MOJO_NO_TLS environment variables.

See DEPLOYMENT in Mojolicious::Guides::Cookbook for more.

SIGNALS

The Mojo::Server::Morbo process can be controlled at runtime with the following signals.

    INT, TERM

Shut down server immediately.

ATTRIBUTES

Mojo::Server::Morbo implements the following attributes.

    daemon



  my $daemon = $morbo->daemon;
  $morbo     = $morbo->daemon(Mojo::Server::Daemon->new);



Mojo::Server::Daemon object this server manages.

    watch



  my $watch = $morbo->watch;
  $morbo    = $morbo->watch([/home/sri/my_app]);



Files and directories to watch for changes, defaults to the application script as well as the lib and templates directories in the current working directory.

METHODS

Mojo::Server::Morbo inherits all methods from Mojo::Base and implements the following new ones.

    modified_files



  my $files = $morbo->modified_files;



Check if files from watch have been modified since the last check and return an array reference with the results.



  # All files that have been modified
  say for @{$morbo->modified_files};



    run



  $morbo->run(script/my_app);



Run server for application and wait for SIGNALS.

SEE ALSO

Mojolicious, Mojolicious::Guides, <http://mojolicious.org>.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MOJO::SERVER::MORBO (3) 2016-03-16

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.