summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile4
-rw-r--r--public/index.html10
-rw-r--r--scarecrow.rb9
3 files changed, 23 insertions, 0 deletions
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..ee1d4a8
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,4 @@
+source 'https://rubygems.org'
+gem 'sinatra'
+gem 'thin'
+gem 'mqtt'
diff --git a/public/index.html b/public/index.html
new file mode 100644
index 0000000..376974f
--- /dev/null
+++ b/public/index.html
@@ -0,0 +1,10 @@
+<html>
+ <head>
+ <title>
+ Scarecrow - Watches over the garden
+ </title>
+ </head>
+ <body>
+ Hello Scarecrow
+ </body>
+</html>
diff --git a/scarecrow.rb b/scarecrow.rb
new file mode 100644
index 0000000..a4a057b
--- /dev/null
+++ b/scarecrow.rb
@@ -0,0 +1,9 @@
+require 'sinatra'
+require 'mqtt'
+
+set :public_folder, File.dirname(__FILE__) + '/public'
+set :bind, '::'
+
+get '/' do
+ send_file File.join(settings.public_folder, 'index.html')
+end