Skip to content

Instantly share code, notes, and snippets.

@nihen
Created January 8, 2010 08:33
Show Gist options
  • Save nihen/271923 to your computer and use it in GitHub Desktop.
Save nihen/271923 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use FindBin;
use Cwd qw/realpath/;
use lib "$FindBin::Bin/../../../local-lib/lib/perl5";
use local::lib '--self-contained', "$FindBin::Bin/../../../local-lib/";
my $plackup_path = realpath("$FindBin::Bin/../../../local-lib/bin/plackup");
my $lib_path = realpath("$FindBin::Bin/../../../lib");
my $extlib_path = realpath("$FindBin::Bin/../../../extlib");
my $psgi_path = realpath("$FindBin::Bin/../../../psgi/all.psgi");
exec(
$plackup_path,
'-I' => $lib_path,
'-I' => $extlib_path,
'-a' => $psgi_path,
'-s' => 'Standalone::Prefork::Server::Starter',
'-E' => 'product',
'--max-keepalive-reqs=1',
'--max-workers=2',
);
#!/usr/bin/perl
use strict;
use warnings;
use FindBin;
use Cwd qw/realpath/;
use lib "$FindBin::Bin/../../../local-lib/lib/perl5";
use local::lib '--self-contained', "$FindBin::Bin/../../../local-lib/";
my $start_server_path = realpath("$FindBin::Bin/../../../local-lib/bin/start_server");
exec(
$start_server_path,
'--port=localhost:3000',
'--',
'./plackupper',
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment