Yes, although it’s intended for development rather than production use. Updates will not be as smooth as on the pi, and some aspects like the regular scheduling of tasks aren’t part of this setup, since for development, these things aren’t needed or are managed by hand.
(It’s already possible to run brewpi on Windows for development, this was just my notes after moving the system over to OS X.)
From somewhere I got the idea that I would be fine if I had a spare machine to run the web server, but apparently I was wrong. I guess I just have to look the other way and pull the visa card to get a raspberry pi.
Here is what I did to get the site working on my Mavericks iMac. I tried running install.sh and quickly found it is pi specific, so I did most of this by just adapting the cmds and using the built in Apache before finding this thread. I plan to do some development, so hopefully I can update this when I can get scripts scheduled and communication with the Spark.
PHP is already installed for you in OS X 10.9 Mavericks. It’s as simple as modifying the httpd.conf file again.
On line 118, uncomment the LoadModule for PHP:
LoadModule php5_module libexec/apache2/libphp5.so
On line 231, add index.php as a default document if a directory is requested:
DirectoryIndex index.html index.php
Lastly, we need to tell Apache to use the PHP handler when requesting files that end in .php or .phps. Append the following code to the end of your httpd.conf file.
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Maybe a silly question, but is there any way to mock the arduino or spark when running the python script? I’m trying to play around with the web app for development purposes but don’t actually have a brewpi at the moment and was wondering if there is some kind of test harness for this.
The web app seems to work fine locally otherwise but it would be nice to have some fake communication happening.