Skip to content

Ruby on Rails application that informs customers of whether the service is up or down.

Notifications You must be signed in to change notification settings

anymoto/service_status

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Service Status

Service Status is a Ruby on Rails application that informs customers of whether Readme is up or down along with a number of time stamped status messages.

Running the application locally

  • Clone this repository:
git clone [email protected]:anymoto/service_status.git
  • Install the dependencies:
bundle install
  • Create the database and run the migrations:
bundle exec rake db:create && bundle exec rake db:migrate
  • Start your local server:
rails server
  • Go to the home page The first time the application runs, your database will be empty, and you won't see any status.

  • The status and new messages can be updated from the command line using cURL. But first, you'll need to create a user and get your token in order to be able to post a new status:

In the Rails console type:

u = User.new(email: USER_EMAIL)
u.save!
u.authentication_token

Once you get your token, you'll be able to post a new service status, like this:

curl -H 'Authorization: Token token=USER_TOKEN' --data "status_message[status]=UP&status_message[message]=Service was restored" http://localhost:3000/api/v1/status_messages
  • Once the status is stored, you will be able to see a populated list in the home page.

  • You can also get the service current status by doing:

curl -i http://localhost:3000/api/v1/status_messages/current

Authentication token is not needed in this case.

API Reference

Locally, you will find the API documentation here.

About

Ruby on Rails application that informs customers of whether the service is up or down.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published