Skip to content

Commit

Permalink
remove .psgi auto-generation and update dispatch.f?cgi to include App…
Browse files Browse the repository at this point in the history
….pl file
  • Loading branch information
miyagawa committed Mar 20, 2010
1 parent e19160b commit ac74c91
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions script/dancer
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ sub app_tree($) {
my ($appname) = @_;

return {
"app.psgi" => FILE,
"+$appname.pl" => FILE,
"$appname.pm" => FILE,
"config.yml" => FILE,
Expand Down Expand Up @@ -168,22 +167,6 @@ sub templates($) {
my $appname = shift;
return {

'app.psgi' =>

"# PSGI application bootstraper for Dancer
use lib '[%appdir%]';
use $appname;
use Dancer::Config 'setting';
setting apphandler => 'PSGI';
Dancer::Config->load;
my \$handler = sub {
my \$env = shift;
my \$request = Dancer::Request->new(\$env);
Dancer->dance(\$request);
};
",
'index.tt' => '<h2>It Works!</h2>
<p>
Expand All @@ -197,14 +180,14 @@ I\'m in <code>[%appdir%]/views/index.tt</code>
"dispatch.cgi" =>
"#!$^X
use Plack::Runner;
Plack::Runner->run('[% appdir %]/app.psgi');
Plack::Runner->run('[% appdir %]/$appname.pl');
",

"dispatch.fcgi" =>
"#!$^X
use Plack::Handler::FCGI;
my \$app = do('[% appdir %]/app.psgi');
my \$app = do('[% appdir %]/$appname.pl');
my \$server = Plack::Handler::FCGI->new(nproc => 5, detach => 1);
\$server->run(\$app);
",
Expand Down Expand Up @@ -420,7 +403,6 @@ Here is an application created with dancer:
+ mywebapp/environments/development.yml
+ mywebapp/mywebapp.pm
+ mywebapp/mywebapp.pl
+ mywebapp/app.psgi
+ mywebapp/favicon.ico
The application is ready to serve:
Expand Down

0 comments on commit ac74c91

Please sign in to comment.