Skip to content

Commit

Permalink
Merge pull request #1658 from Nexmo/healthcheck_route
Browse files Browse the repository at this point in the history
ADD: Healthcheck route (200)
  • Loading branch information
marcoranieri authored Oct 24, 2022
2 parents f62e6e4 + 046b4a9 commit 1c4303a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/nexmo_developer/app/controllers/healthcheck_controller.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions lib/nexmo_developer/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion lib/nexmo_developer/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module NexmoDeveloper
VERSION = '0.5.13'.freeze
VERSION = '0.5.14'.freeze
end

0 comments on commit 1c4303a

Please sign in to comment.