From 525ee6ed4f25a981a280cbffb41d906539fbde0d Mon Sep 17 00:00:00 2001 From: Pieter Verschaffelt Date: Fri, 1 Mar 2024 09:49:37 +0100 Subject: [PATCH] Add some debugging statements --- app/controllers/mpa_controller.rb | 4 ++++ config/deploy/dev.rb | 2 +- config/puma.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/mpa_controller.rb b/app/controllers/mpa_controller.rb index d8aa54d..b90d466 100644 --- a/app/controllers/mpa_controller.rb +++ b/app/controllers/mpa_controller.rb @@ -30,11 +30,15 @@ def pept2data request.content_type = "application/json" request.body = json_data + puts json_data + # Set up the HTTP session response = Net::HTTP.start(uri.hostname, uri.port) do |http| http.request(request) end + puts response.inspect + # Parse the response body as JSON response_data = JSON.parse(response.body) diff --git a/config/deploy/dev.rb b/config/deploy/dev.rb index 6bd5881..5c35eda 100644 --- a/config/deploy/dev.rb +++ b/config/deploy/dev.rb @@ -4,7 +4,7 @@ set :deploy_to, '/home/unipept/rails' -set :server, ENV['server'] || 'rick.ugent.be' +set :server, ENV['server'] || 'rick.taild1497.ts.net' # don't specify db as it's not needed for unipept server "#{fetch(:server)}", user: 'unipept', roles: %i[web app], ssh_options: { diff --git a/config/puma.rb b/config/puma.rb index daaf036..ded36cc 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -15,7 +15,7 @@ # Specifies the `port` that Puma will listen on to receive requests; default is 3000. # -port ENV.fetch("PORT") { 3000 } +port ENV.fetch("PORT") { 3001 } # Specifies the `environment` that Puma will run in. #