damog / Dancer forked from sukria/Dancer
- Source
- Commits
- Network (11)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
Dancer /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
.perltidyrc | Fri Sep 25 10:21:01 -0700 2009 | |
| |
AUTHORS | ||
| |
CHANGES | Thu Oct 01 00:11:56 -0700 2009 | |
| |
MANIFEST | Wed Sep 30 23:35:30 -0700 2009 | |
| |
Makefile.PL | ||
| |
README | Tue Sep 22 23:47:36 -0700 2009 | |
| |
ROADMAP | Wed Sep 23 14:30:18 -0700 2009 | |
| |
TODO | ||
| |
example/ | Sun Sep 27 04:05:07 -0700 2009 | |
| |
lib/ | ||
| |
script/ | ||
| |
t/ |
README
Dancer
The easiest way to write a webapp with Perl
=== ABOUT ===
That project intends to become a port of Ruby's Sinatra framework: a framework
for building web application with minimal-effort in mind.
The user should be able to define a webapp with very few lines of codes.
=== NEWS ===
Dancer's development moves very fast, to stay tuned follow
sukria on Twitter: http://twitter.com/sukria
=== EXAMPLE ===
To create a new Dancer application, use the helper script "dancer" provided
with this distribution:
$ dancer -a mywebapp
+ mywebapp
+ mywebapp/config.yml
+ mywebapp/views
+ mywebapp/views/layouts
[..]
You have then a new Dancer application in 'mywebapp'.
Here is an example of a webapp built with Dancer:
# webapp.pl
#!/usr/bin/perl
use Dancer;
get '/' => sub {
"Hello There!"
};
get '/hello/:name' => sub {
"Hey ".params->{name}.", how are you?";
};
post '/new' => sub {
"creating new entry: ".params->{name};
};
Dancer->dance;
When running this script, a webserver is running and ready to serve:
$ perl ./webapp.pl
>> Listening on 127.0.0.1:1915
== Entering the dance floor ...
Then it's possible to access any route defined in the script:
$ curl http://localhost:1915/
Hello There!
Feel free to fork that project if you like the idea and want to add some
features.
=== DEPENDENCIES ===
Dancer depends on the following modules
- HTTP::Server::Simple
- File::MimeInfo
- Template
=== PRODUCTION MATTERS ===
This is a work in progress.
Dancer supports PSGI/Plack, to run a Dancer app with PSGI/Plack
See
http://www.sukria.net/fr/archives/2009/09/20/mounting-a-dancer-app-into-apache-psgiplack/
=== WEBSITE ===
For more details about the project, checkout the official website:
http://dancer.sukria.net

