diff --git a/app/views/home/index.html.slim b/app/views/home/index.html.slim index e69de29b..e7a08ddb 100644 --- a/app/views/home/index.html.slim +++ b/app/views/home/index.html.slim @@ -0,0 +1,5 @@ +h1 recursos + +ul + li + = link_to "API docs", "/apipie" diff --git a/config/deploy.rb b/config/deploy.rb index e9d7c215..b5335a15 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -48,10 +48,11 @@ after :restart, :clear_cache do on roles(:web), in: :groups, limit: 3, wait: 10 do - # Here we can do anything such as: - # within release_path do - # execute :rake, 'cache:clear' - # end + within release_path do + with rails_env: fetch(:rails_env) do + execute :rake, 'apipie:cache' + end + end end end diff --git a/config/initializers/apipie.rb b/config/initializers/apipie.rb index 253bfe41..bcdd3916 100644 --- a/config/initializers/apipie.rb +++ b/config/initializers/apipie.rb @@ -4,6 +4,7 @@ config.api_base_url = "/api" config.doc_base_url = "/apipie" config.markup = Apipie::Markup::Markdown.new + config.use_cache = Rails.env.production? config.app_info["1.0"] = <<-EOS ## moi backend api diff --git a/config/routes.rb b/config/routes.rb index 09a86e43..d8a9b0c6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -261,6 +261,6 @@ anchor: false, via: [:get, :post] - root to: redirect("/apipie") + root "home#index" apipie end