This is one of my favorite foods. I was bored and thinking of recipes I'd like to try and thought this one up. It is delicious.
One Medium Onion 3 cloves garlic French Beans
/* | |
App plugins can be loaded over an instance of App by setting a route with a wildcard path | |
such as: | |
{ | |
path:'/:app/*', | |
callback: 'dispatchApp' | |
} | |
where the app param is the module name of the plugin, | |
which should have its entry in the YUI config file (unless loaded by some other means) | |
*/ |
sub guide : Local { | |
my ( $self, $c ) = @_; | |
unless ( $c->debug ) { | |
$c->detach('/error/not_found'); | |
} | |
my $template = 'index.tt'; | |
if ( @{ $c->req->args } ) { |
#!/usr/bin/env node | |
var optimist = require('optimist') | |
.usage('Precompile handlebar templates.\nUsage: $0 template...', { | |
'f': { | |
'type': 'string', | |
'description': 'Output File', | |
'alias': 'output' | |
}, | |
'k': { |
#!/bin/bash | |
PORT=5000 | |
# This should be the directory name/app name | |
APP="TDP" | |
PIDFILE="$HOME/$APP.pid" | |
STATUS="$HOME/$APP.status" | |
# The actual path on disk to the application. | |
APP_HOME="$HOME/$APP" |
#!/bin/bash | |
# This script should be switched up to be a buildy task, see | |
# https://github.com/mosen/buildy | |
# | |
# Each root/templates/(*)/(*).html should be baked to: | |
# -> template-$1-$2/template-$1-$2-min.js | |
# | |
# Then a template rollup file |
[%~ | |
# Some illustrious documentation to get you started: | |
# | |
# The macros defined are to generate markup to save people from copy and pasting | |
# markup. They copy and paste hashes instead, which should be safer (in theory) | |
# | |
# The macros for forms are: | |
# * text_field - A simple text field, pass in type to override input type | |
# * password_field - A password field, equivalent to | |
# text_field({ type => 'password', ... }) |
use Filesys::Notify::Simple; | |
use App::Prove; | |
use lib qw(lib); | |
my $tests = @ARGV; | |
my $watcher = Filesys::Notify::Simple->new([ './lib', './t/lib' ]); | |
my $prove = App::Prove->new; |
/* Render the login action */ | |
app.get('/login', function(req, res) { | |
res.render('login') | |
}); | |
/* Handle posting, if it fails this redirects back to /login, following POST-Redirect-GET */ | |
app.post('/login', | |
requireAuth(Y), | |
function(req, res) { | |
/** |