diff --git a/lib/nexmo_developer/app/controllers/healthcheck_controller.rb b/lib/nexmo_developer/app/controllers/healthcheck_controller.rb new file mode 100644 index 000000000..74b3a3794 --- /dev/null +++ b/lib/nexmo_developer/app/controllers/healthcheck_controller.rb @@ -0,0 +1,8 @@ +class HealthcheckController < ApplicationController + def ping + respond_to do |format| + format.html { render plain: 'OK', status: :ok } + format.json { render json: { ping: 'OK' }, status: :ok } + end + end +end diff --git a/lib/nexmo_developer/config/routes.rb b/lib/nexmo_developer/config/routes.rb index 0fede8398..c213b3db0 100644 --- a/lib/nexmo_developer/config/routes.rb +++ b/lib/nexmo_developer/config/routes.rb @@ -111,6 +111,8 @@ get '/changelogs', to: 'changelogs#index' get '/changelogs/:folder/:name', to: 'changelogs#show', as: 'changelog' + get '/ping', to: 'healthcheck#ping' + get '*unmatched_route', to: 'application#not_found' root 'static#landing' diff --git a/lib/nexmo_developer/version.rb b/lib/nexmo_developer/version.rb index 56dbe3181..e0c7b44b5 100644 --- a/lib/nexmo_developer/version.rb +++ b/lib/nexmo_developer/version.rb @@ -1,3 +1,3 @@ module NexmoDeveloper - VERSION = '0.5.13'.freeze + VERSION = '0.5.14'.freeze end