use Clone qw(clone);
use Mojo::UserAgent;
+our $VERSION = '0.3';
+
sub new_uuid { Time::HiRes::time * 100000 }
#push @{app->static->paths}, 'app'; # default angular-seed app directory
my $couchdb = $ENV{COUCHDB} || 'http://localhost:5984';
-my $couchdb_view = 'http://10.60.0.92:5984/_utils/document.html?drzb2013v2/';
+my $couchdb_database = 'drzb2013v2';
+my $couchdb_view = "http://10.60.0.92:5984/_utils/document.html?$couchdb_database";
my $client = Mojo::UserAgent->new;
sub _couchdb_put {
return $locale{ $lang } || "MISSING $lang $_[1]";
};
+get '/js/services.js' => sub {
+ my $self = shift;
+ $self->stash( VERSION => $VERSION );
+ $self->stash( couchdb_database => $couchdb_database );
+ $self->render( 'js/services', format => 'js' );
+};
+
# short public URLs
get '/hr' => sub { shift->redirect_to('/lang/hr/drzb2013') };
get '/en' => sub { shift->redirect_to('/lang/en/drzb2013') };