[Jifty-commit] jifty branch, master, updated. 87dd4c7385010fac05d54c3df6110cd934062044

Jifty commits jifty-commit at lists.jifty.org
Fri Mar 5 07:38:37 EST 2010


The branch, master has been updated
       via  87dd4c7385010fac05d54c3df6110cd934062044 (commit)
      from  fa0386fd00428e4334d77e693e42846d9df1fc62 (commit)

Summary of changes:
 lib/Jifty/Script/Server.pm |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 87dd4c7385010fac05d54c3df6110cd934062044
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Mar 5 20:38:13 2010 +0800

    add server_ready sub so we can print banner

diff --git a/lib/Jifty/Script/Server.pm b/lib/Jifty/Script/Server.pm
index 5e9806f..6e33347 100755
--- a/lib/Jifty/Script/Server.pm
+++ b/lib/Jifty/Script/Server.pm
@@ -194,7 +194,15 @@ sub _run_server {
     Jifty->config->framework('Web')->{'Port'} = $self->{port} if $self->{port};
     my $port = Jifty->config->framework('Web')->{'Port'} || 8888;
 
-    my %args = ( port => $port );
+    my %args = (
+        port         => $port,
+        server_ready => sub {
+            Jifty->log->info( 'You can connect to your server at http://'
+                  . ( $self->{host} || 'localhost' )
+                  . ":$port/" );
+        },
+    );
+
     $args{$_} = $self->{$_} for grep defined $self->{$_}, qw/host user group/;
 
     $Jifty::SERVER = Plack::Loader->load('Standalone', %args);

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list