Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 84e6d3d
Showing
166 changed files
with
42,458 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Step01 - Initial Dancer App |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
MANIFEST | ||
cpanfile | ||
Makefile.PL | ||
MANIFEST.SKIP | ||
config.yml | ||
.dancer | ||
public/dispatch.fcgi | ||
public/500.html | ||
public/dispatch.cgi | ||
public/favicon.ico | ||
public/404.html | ||
public/images/perldancer-bg.jpg | ||
public/images/perldancer.jpg | ||
public/css/style.css | ||
public/css/error.css | ||
public/javascripts/jquery.js | ||
t/001_base.t | ||
t/002_index_route.t | ||
lib/Todo.pm | ||
views/index.tt | ||
views/layouts/main.tt | ||
environments/production.yml | ||
environments/development.yml | ||
bin/app.psgi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
^\.git\/ | ||
maint | ||
^tags$ | ||
.last_cover_stats | ||
Makefile$ | ||
^blib | ||
^pm_to_blib | ||
^.*.bak | ||
^.*.old | ||
^t.*sessions | ||
^cover_db | ||
^.*\.log | ||
^.*\.swp$ | ||
MYMETA.* | ||
^.gitignore | ||
^.svn\/ | ||
^Todo- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use strict; | ||
use warnings; | ||
use ExtUtils::MakeMaker; | ||
|
||
# Normalize version strings like 6.30_02 to 6.3002, | ||
# so that we can do numerical comparisons on it. | ||
my $eumm_version = $ExtUtils::MakeMaker::VERSION; | ||
$eumm_version =~ s/_//; | ||
|
||
WriteMakefile( | ||
NAME => 'Todo', | ||
AUTHOR => q{YOUR NAME <youremail@example.com>}, | ||
VERSION_FROM => 'lib/Todo.pm', | ||
ABSTRACT => 'YOUR APPLICATION ABSTRACT', | ||
($eumm_version >= 6.3001 | ||
? ('LICENSE'=> 'perl') | ||
: ()), | ||
PL_FILES => {}, | ||
PREREQ_PM => { | ||
'Test::More' => 0, | ||
'YAML' => 0, | ||
'Dancer2' => 0.166001, | ||
}, | ||
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, | ||
clean => { FILES => 'Todo-*' }, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
use FindBin; | ||
use lib "$FindBin::Bin/../lib"; | ||
|
||
use Todo; | ||
Todo->to_app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# This is the main configuration file of your Dancer2 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: "Todo" | ||
|
||
# The default layout to use for your application (located in | ||
# views/layouts/main.tt) | ||
layout: "main" | ||
|
||
# when the charset is set to UTF-8 Dancer2 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: | ||
# template_toolkit: | ||
# start_tag: '<%' | ||
# end_tag: '%>' | ||
|
||
# session engine | ||
# | ||
# Simple: in-memory session store - Dancer2::Session::Simple | ||
# YAML: session stored in YAML files - Dancer2::Session::YAML | ||
# | ||
# Check out metacpan for other session storage options: | ||
# https://metacpan.org/search?q=Dancer2%3A%3ASession&search_type=modules | ||
# | ||
# Default value for 'cookie_name' is 'dancer.session'. If you run multiple | ||
# Dancer apps on the same host then you will need to make sure 'cookie_name' | ||
# is different for each app. | ||
# | ||
#engines: | ||
# session: | ||
# Simple: | ||
# cookie_name: testapp.session | ||
# | ||
#engines: | ||
# session: | ||
# YAML: | ||
# cookie_name: eshop.session | ||
# is_secure: 1 | ||
# is_http_only: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
requires "Dancer2" => "0.166001"; | ||
|
||
recommends "YAML" => "0"; | ||
recommends "URL::Encode::XS" => "0"; | ||
recommends "CGI::Deurl::XS" => "0"; | ||
recommends "HTTP::Parser::XS" => "0"; | ||
|
||
on "test" => sub { | ||
requires "Test::More" => "0"; | ||
requires "HTTP::Request::Common" => "0"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# configuration file for development environment | ||
|
||
# the logger engine to use | ||
# console: log messages to STDOUT (your console where you started the | ||
# application server) | ||
# file: log message to a file in log/ | ||
logger: "console" | ||
|
||
# the log level for this environment | ||
# core is the lowest, it shows Dancer2's core log messages as well as yours | ||
# (debug, info, warning and error) | ||
log: "core" | ||
|
||
# should Dancer2 consider warnings as critical errors? | ||
warnings: 1 | ||
|
||
# should Dancer2 show a stacktrace when an 5xx error is caught? | ||
# if set to yes, public/500.html will be ignored and either | ||
# views/500.tt, 'error_template' template, or a default error template will be used. | ||
show_errors: 1 | ||
|
||
# print the banner | ||
startup_info: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# configuration file for production environment | ||
|
||
# only log warning and error messsages | ||
log: "warning" | ||
|
||
# log message to a file in logs/ | ||
logger: "file" | ||
|
||
# don't consider warnings critical | ||
warnings: 0 | ||
|
||
# hide errors | ||
show_errors: 0 | ||
|
||
# disable server tokens in production environments | ||
no_server_tokens: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package Todo; | ||
use Dancer2; | ||
|
||
our $VERSION = '0.1'; | ||
|
||
get '/' => sub { | ||
template 'index'; | ||
}; | ||
|
||
true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> | ||
<title>Error 404</title> | ||
<link rel="stylesheet" href="/css/error.css"> | ||
</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/">Dancer2</a>. | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> | ||
<title>Error 500</title> | ||
<link rel="stylesheet" href="/css/error.css"> | ||
</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/">Dancer2</a>. | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
body { | ||
font-family: Lucida,sans-serif; | ||
} | ||
|
||
h1 { | ||
color: #AA0000; | ||
border-bottom: 1px solid #444; | ||
} | ||
|
||
h2 { color: #444; } | ||
|
||
pre { | ||
font-family: "lucida console","monaco","andale mono","bitstream vera sans mono","consolas",monospace; | ||
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; | ||
overflow-x: auto; | ||
} | ||
|
||
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; | ||
} | ||
|
Oops, something went wrong.