Dancer

 view release on metacpan or  search on metacpan

bin/dancer  view on Meta::CPAN

                    <td><tt><% settings.logger %></tt></td>
                </tr>
                <tr>
                    <td>Running environment</td>
                    <td><tt><% settings.environment %></tt></td>
                </tr>
                </tbody>
            </table>
          </div>

    <script type="text/javascript">
    $(\'#about_env_link\').click(function() {
        $(\'#about-content\').slideToggle(\'fast\', function() {
            // ok
        });
        return( false );
    });
    </script>


          <ol>          
            <li>
              <h2>Tune your application</h2>

              <p>
              Your application is configured via a global configuration file,
              <tt>config.yml</tt> and an "environment" configuration file,
              <tt>environments/development.yml</tt>. Edit those files if you
              want to change the settings of your application.
              </p>
            </li>

            <li>
              <h2>Add your own routes</h2>

              <p>
              The default route that displays this page can be removed,
              it\'s just here to help you get started. The template used to
              generate this content is located in 
              <code>views/index.tt</code>.
              You can add some routes to <tt>lib/'.$LIB_PATH.$LIB_FILE.'</tt>. 
              </p>
            </li>

            <li>
                <h2>Enjoy web development again</h2>

                <p>
                Once you\'ve made your changes, restart your standalone server
                (bin/app.pl) and you\'re ready to test your web application.
                </p>
            </li>

          </ol>
        </div>
      </div>
    </div>
',

'main.tt'   =>
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-type" content="text/html; charset=<% settings.charset %>" />
<title>'.$appname.'</title>
<link rel="stylesheet" href="<% request.uri_base %>/css/style.css" />

<!-- Grab jQuery from a CDN, fall back to local if necessary -->
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript">/* <![CDATA[ */
    !window.jQuery && document.write(\'<script type="text/javascript" src="<% request.uri_base %>/javascripts/jquery.min.js"><\/script>\')
/* ]]> */</script>

</head>
<body>
<% content %>
<div id="footer">
Powered by <a href="http://perldancer.org/">Dancer</a> <% dancer_version %>
</div>
</body>
</html>
',

"dispatch.cgi" =>
"$PERL_INTERPRETER
use Dancer ':syntax';
use FindBin '\$RealBin';
use Plack::Runner;

# For some reason Apache SetEnv directives don't propagate
# correctly to the dispatchers, so forcing PSGI and env here 
# is safer.
set apphandler => 'PSGI';
set environment => 'production';

my \$psgi = path(\$RealBin, '..', 'bin', 'app.pl');
die \"Unable to read startup script: \$psgi\" unless -r \$psgi;

Plack::Runner->run(\$psgi);
",


"dispatch.fcgi" =>
qq{$PERL_INTERPRETER
use Dancer ':syntax';
use FindBin '\$RealBin';
use Plack::Handler::FCGI;

# For some reason Apache SetEnv directives don't propagate
# correctly to the dispatchers, so forcing PSGI and env here 
# is safer.
set apphandler => 'PSGI';
set environment => 'production';

my \$psgi = path(\$RealBin, '..', 'bin', 'app.pl');
my \$app = do(\$psgi);
die "Unable to read startup script: \$@" if \$@;
my \$server = Plack::Handler::FCGI->new(nproc => 5, detach => 1);

\$server->run(\$app);

bin/dancer  view on Meta::CPAN

    font-size: 12px;
    border-left: 2px solid #777;
    padding-left: 1em;
}

footer {
    font-size: 10px;
}

span.key {
    color: #449;
    font-weight: bold;
    width: 120px;
    display: inline;
}

span.value {
    color: #494;
}

/* these are for the message boxes */

pre.content {
    background-color: #eee;
    color: #000;
    padding: 1em;
    margin: 0;
    border: 1px solid #aaa;
    border-top: 0;
    margin-bottom: 1em;
}

div.title {
    font-family: \"lucida console\",\"monaco\",\"andale mono\",\"bitstream vera sans mono\",\"consolas\",monospace;
    font-size: 12px;
    background-color: #aaa;
    color: #444;
    font-weight: bold;
    padding: 3px;
    padding-left: 10px;
}

pre.content span.nu {
    color: #889;
    margin-right: 10px;
}

pre.error {
    background: #334;
    color: #ccd;
    padding: 1em;
    border-top: 1px solid #000;
    border-left: 1px solid #000;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

",

"404.html" => <<EOH,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Error 404</title>
<link rel="stylesheet" href="/css/error.css" />
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>Error 404</h1>
<div id="content">
<h2>Page Not Found</h2><p>Sorry, this is the void.</p>
</div>
<div id="footer">
Powered by <a href="http://perldancer.org/">Dancer</a>.
</div>
</body>
</html>
EOH

"500.html" => <<EOH,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Error 500</title>
<link rel="stylesheet" href="/css/error.css" />
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>Error 500</h1>
<div id="content">
<h2>Internal Server Error</h2><p>Wooops, something went wrong</p>
</div>
<div id="footer">
Powered by <a href="http://perldancer.org/">Dancer</a>.
</div>
</body>
</html>
EOH

'config.yml' =>

"# This is the main configuration file of your Dancer app
# env-related settings should go to environments/\$env.yml.
# All the settings in this file will be loaded at Dancer's startup.

# Your application's name
appname: \"$name\"

# The default layout to use for your application (located in
# views/layouts/main.tt)
layout: \"main\"

# When the charset is set to UTF-8 Dancer will handle for you
# all the magic of encoding and decoding. You should not care
# about unicode within your app when this setting is set (recommended).
charset: \"UTF-8\"

# template engine
# simple: default and very basic template engine
# template_toolkit: TT

template: \"simple\"

# template: \"template_toolkit\"
# engines:
#   template_toolkit:
#     start_tag: '[%'
#     end_tag:   '%]'

# For session support enable the following line and see Dancer::Session
# session: \"YAML\"

",

'jquery.min.js' => jquery_minified(),

'MANIFEST.SKIP' => manifest_skip(),

'development.yml' =>
"# configuration file for development environment



( run in 0.944 second using v1.01-cache-2.11-cpan-501a3233654 )