Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
Add health check for get '/'
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Aroney committed Nov 8, 2018
1 parent 02c5a31 commit d9f9b17
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
class ApplicationController < ActionController::API
def health
render json: {status: 'ok', version: VERSION}.to_json
end
end
3 changes: 3 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
require_relative '../version'

Rails.application.routes.draw do
post "/graphql", to: "graphql#execute"
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
get "/", to: "application#health"
end
1 change: 1 addition & 0 deletions version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION = '0.0.1'

0 comments on commit d9f9b17

Please sign in to comment.