summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Robinson <joe@lc8n.com>2019-02-16 20:27:40 +0000
committerJoe Robinson <joe@lc8n.com>2019-02-16 20:27:40 +0000
commitf0d35d959c4daa8bd9f71ff4594326ae78ab92c4 (patch)
treef8ac8ed2f0de4f655b8bc790c2d3d47d28b044ec
parent646f53e75355c3bb0a0db6455d91af98dc6abd61 (diff)
Initial file structure
-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