]> git.ktnx.net Git - lsl.git/commitdiff
clean unused parts, add web app mount
authorDamyan Ivanov <dmn@debian.org>
Wed, 9 Feb 2022 17:33:22 +0000 (17:33 +0000)
committerDamyan Ivanov <dmn@debian.org>
Wed, 9 Feb 2022 17:33:22 +0000 (17:33 +0000)
bin/app.psgi

index 820846c72e9a001d501278306dce38a2b1aa5549..c41a2955d491558db01b18efe8e7c28de8046dac 100755 (executable)
@@ -6,39 +6,15 @@ 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 App::LazyShoppingList::Web;
 
 use Plack::Builder;
 
 builder {
-    mount '/api/v1'    => App::LazyShoppingList::API::v1->to_app;
-    #    mount '/'       => App::REST::LazyShoppingList::WEB->to_app;
+    enable 'Deflater';
+    mount '/api/v1' => App::LazyShoppingList::API::v1->to_app;
+    mount '/'       => App::LazyShoppingList::Web->to_app;
 }