From: Damyan Ivanov Date: Wed, 9 Feb 2022 17:33:22 +0000 (+0000) Subject: clean unused parts, add web app mount X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=dae313e1e7d71ba5acdadd3058704ff4ae25e452;p=lsl.git clean unused parts, add web app mount --- diff --git a/bin/app.psgi b/bin/app.psgi index 820846c..c41a295 100755 --- a/bin/app.psgi +++ b/bin/app.psgi @@ -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; }