Changeset 93 in bookmarks


Ignore:
Timestamp:
06/05/15 23:16:38 (7 years ago)
Author:
peter
Message:

changed the start script to a Perl script using Plack::Runner, to prepare for allowing setting the port and other settings in the config

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/start

    r70 r93  
    1 #!/bin/sh 
     1#!/usr/bin/perl -w 
     2use strict; 
    23 
    3 export PERL5LIB=./lib 
    4 export CONFIG_FILE=${1:-"conf.yml"} 
     4use FindBin; 
     5use lib "$FindBin::RealBin/lib"; 
    56 
    6 starman --listen :5000 --daemonize --pid pid --error-log errors --access-log access 
     7use Plack::Runner; 
     8use BookmarksApp; 
     9 
     10my $CONFIG_FILE = shift || 'conf.yml'; 
     11my $app = BookmarksApp->new({ config_file => $CONFIG_FILE })->to_app; 
     12 
     13my $runner = Plack::Runner->new(server => 'Starman'); 
     14$runner->parse_options(qw{--listen :5000 --daemonize --pid pid --error-log errors --access-log access}); 
     15$runner->run($app); 
Note: See TracChangeset for help on using the changeset viewer.