Crash-sms is a Clojure program that runs on Heroku at https://fathomless-woodland-85635.herokuapp.com/ which checks a list of websites every 2 hours and texts a list of phones when a website does not conform to a valid state. Non cached website pages are checked for database, WordPress, and Node.js errors and or crashes. The Heroku add-on Till Mobile handles the SMS messaging, while Temporize Scheduler add-on handles the cron jobs.
System Setup:
-
get Java Windows x64 jdk-8u271-windows-x64.exe
-
get Leiningen installer
-
$ cd crash-sms
-
To download Clojure dependencies:
$ lein deps
M-x load-file /crash-sms/src/core.clj
M-x cider-jack-in
M-x cider-ns-refresh
M-x cider-repl-set-ns
core> (-local-main USE_FAKE_DB LOCAL_CONFIG)
core> (-local-main USE_MONGER_DB LOCAL_CONFIG)
core> (-local-main USE_AMAZONICA_DB LOCAL_CONFIG)
core> (-local-main USE_MONGER_DB HEROKU_CONFIG)
core-test> (mock-tests)
core-test> (all-tests)
http://localhost:8080/
http://localhost:8080/cron-execution-test
http://localhost:8080/sms-send-test
:CRON_URL_DIR
:PHONE_NUMBERS
:SEND_TEST_SMS_URL
:TILL_API
:TILL_USERNAME