Permalink
Browse files

fixed start up script.

  • Loading branch information...
1 parent abfb53b commit 73f69f4d6da70227dc82892fe2375b8eec597db9 @yusukebe committed Apr 14, 2013
Showing with 7 additions and 18 deletions.
  1. +7 −18 script/nopaste_web
View
@@ -1,21 +1,10 @@
#!/usr/bin/env perl
-use Mojo::Base -strict;
-use File::Basename 'dirname';
-use File::Spec;
+use strict;
+use warnings;
-use lib join '/', File::Spec->splitdir(dirname(__FILE__)), 'lib';
-use lib join '/', File::Spec->splitdir(dirname(__FILE__)), '..', 'lib';
-
-# Check if Mojolicious is installed;
-die <<EOF unless eval 'use Mojolicious::Commands; 1';
-It looks like you don't have the Mojolicious framework installed.
-Please visit http://mojolicio.us for detailed installation instructions.
-
-EOF
-
-# Application
-$ENV{MOJO_APP} ||= 'Nopaste::Web';
-
-# Start commands
-Mojolicious::Commands->start;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+# Start command line interface for application
+require Mojolicious::Commands;
+Mojolicious::Commands->start_app('Nopaste::Web');

0 comments on commit 73f69f4

Please sign in to comment.