Skip to content

Instantly share code, notes, and snippets.

@predavlad
Created February 13, 2018 14:42
Show Gist options
  • Save predavlad/b174064d810c8b5a7283da7a65d1eb20 to your computer and use it in GitHub Desktop.
Save predavlad/b174064d810c8b5a7283da7a65d1eb20 to your computer and use it in GitHub Desktop.
A simple healthcheck
<?php
require_once "app/Mage.php";
Mage::app();
$category = Mage::getModel('catalog/category')->load(3);
$name = $category->getName();
if (strlen($name)) {
header("HTTP/1.1 200 OK");
exit(0);
}
header("HTTP/1.1 500 Error");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment