summaryrefslogtreecommitdiff
path: root/up-www.rb
diff options
context:
space:
mode:
authorpks <pks@pks.rocks>2021-03-21 15:26:53 +0100
committerpks <pks@pks.rocks>2021-03-21 15:26:53 +0100
commitd877b1d8e70e21d9f173db3fdafdccfb6d7bbdaf (patch)
treec50421e42e1b2779c9bc281034b6fc993f821f62 /up-www.rb
parent197dd4ff6de23e22be45ec115389f8b0bac151ac (diff)
include, env, html
Diffstat (limited to 'up-www.rb')
-rwxr-xr-x[-rw-r--r--]up-www.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/up-www.rb b/up-www.rb
index 049f897..53061b8 100644..100755
--- a/up-www.rb
+++ b/up-www.rb
@@ -2,7 +2,16 @@
require "sinatra"
require "zipf"
-require "./up"
+$:.unshift File.dirname(__FILE__)
+require "up"
+
+if ENV['APP_ENV'] == :production
+ set :port, 80
+ set :bind, "0.0.0.0"
+else
+ set :port, 8080
+ set :bind, "127.0.0.1"
+end
configure do
hosts = {}
@@ -56,7 +65,9 @@ end
get '/' do
out =<<EOS
+<html>
<head>
+ <meta name="viewport" content="width=device-width; initial-scale=1.0" />
<style type="text/css">
.box { border:2px dashed black;
float:left;