]> git.ktnx.net Git - lsl.git/blobdiff - bin/app.psgi
first take at a Dancer2 app, some functions work
[lsl.git] / bin / app.psgi
diff --git a/bin/app.psgi b/bin/app.psgi
new file mode 100755 (executable)
index 0000000..820846c
--- /dev/null
@@ -0,0 +1,44 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+
+=begin comment
+# use this block if you don't need middleware, and only have a single target Dancer app to run here
+use App::LazyShoppingList::API;
+
+App::LazyShoppingList::API->to_app;
+
+=end comment
+
+=begin comment
+# use this block if you want to include middleware such as Plack::Middleware::Deflater
+
+use App::LazyShoppingList::API;
+use Plack::Builder;
+
+builder {
+    enable 'Deflater';
+    App::LazyShoppingList::API->to_app;
+}
+
+=end comment
+
+=cut
+
+# use this block if you want to mount several applications on different path
+
+use App::LazyShoppingList::API::v1;
+#use App::LazyShoppingList::WEB;
+
+use Plack::Builder;
+
+builder {
+    mount '/api/v1'    => App::LazyShoppingList::API::v1->to_app;
+    #    mount '/'       => App::REST::LazyShoppingList::WEB->to_app;
+}
+
+