Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added duckduckhack to publisher, removed old legacy static command

  • Loading branch information...
commit 06a9592c93a9b7427047c094a70a6319e0ffe492 1 parent d2ffbb4
@Getty Getty authored
Showing with 5 additions and 53 deletions.
  1. +5 −1 lib/App/DuckPAN/Cmd/Publisher.pm
  2. +0 −52 lib/App/DuckPAN/Cmd/Static.pm
View
6 lib/App/DuckPAN/Cmd/Publisher.pm
@@ -9,7 +9,7 @@ use MooX::Options;
use Path::Class;
use Plack::Handler::Starman;
-for (qw( duckduckgo dontbubbleus donttrackus whatisdnt fixtracking )) {
+for (qw( duckduckgo dontbubbleus donttrackus whatisdnt fixtracking duckduckhack )) {
option $_ => (
is => 'ro',
format => 's',
@@ -50,6 +50,10 @@ sub run {
port => 5004,
url => $self->has_fixtracking ? $self->fixtracking : "http://fixtracking.com/",
},
+ duckduckhack => {
+ port => 5005,
+ url => $self->has_duckduckhack ? $self->duckduckhack : "http://duckduckhack.com/",
+ },
);
for (sort { $sites{$a}->{port} <=> $sites{$b}->{port} } keys %sites) {
View
52 lib/App/DuckPAN/Cmd/Static.pm
@@ -1,52 +0,0 @@
-package App::DuckPAN::Cmd::Static;
-# ABSTRACT: Starting up the static webserver
-
-use Moo;
-with qw( App::DuckPAN::Cmd );
-
-use MooX::Options;
-
-use Plack::Handler::Starman;
-
-sub run {
- my ( $self, @args ) = @_;
-
- print "\n\nStarting up static webserver...";
- print "\n\nYou can stop the webserver with Ctrl-C";
- print "\n\n";
-
- require App::DuckPAN::WebStatic;
-
- my %sites = (
- duckduckgo => {
- port => 5000,
- url => "http://duckduckgo.com/",
- },
- dontbubbleus => {
- port => 5001,
- url => "http://dontbubble.us/",
- },
- donttrackus => {
- port => 5002,
- url => "http://donttrack.us/",
- },
- whatisdnt => {
- port => 5003,
- url => "http://whatisdnt.com/",
- },
- );
-
- for (keys %sites) {
- print "Serving ".$sites{$_}->{url}." on ".$sites{$_}->{port}."\n";
- }
-
- print "\n\n";
-
- my $web = App::DuckPAN::WebStatic->new(
- sites => \%sites,
- );
- my @ports = map { $sites{$_}->{port} } keys %sites;
- exit Plack::Handler::Starman->new(listen => [ map { ":$_" } @ports ])->run(sub { $web->run_psgi(@_) });
-}
-
-1;

0 comments on commit 06a9592

Please sign in to comment.
Something went wrong with that request. Please try again.