summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Beauchamp <daniel.beauchamp@shopify.com>2012-10-30 11:45:12 -0400
committerDaniel Beauchamp <daniel.beauchamp@shopify.com>2012-10-30 11:45:12 -0400
commit76cf77a89a17dd12299a6f4b63c967163ceae39a (patch)
tree9c9d54c05470da7ef937e1c0b681440d61910b5e /bin
parenta4a4564f760bb1bcd541366186cd46488d5a569b (diff)
Make the default port 3030
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dashing5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/dashing b/bin/dashing
index e363ee2..fb1332f 100755
--- a/bin/dashing
+++ b/bin/dashing
@@ -14,7 +14,7 @@ def send_event(id, data)
req = Net::HTTP::Post.new("/widgets/#{id}")
req["content-type"] = "application/json"
req.body = JSON.unparse(data.merge(:auth_token => Dashing::CLI.auth_token))
- res = Net::HTTP.new('localhost', 3000).start { |http| http.request(req) }
+ res = Net::HTTP.new('localhost', 3030).start { |http| http.request(req) }
puts "Data Sent to #{id}: #{data}"
end
@@ -61,8 +61,9 @@ module Dashing
desc "start", "Starts the server in style!"
method_option :job_path, :desc => "Specify the directory where jobs are stored"
def start(*args)
+ port_option = args.include?('-p')? '' : ' -p 3030'
args = args.join(" ")
- command = "bundle exec thin -R config.ru start #{args}"
+ command = "bundle exec thin -R config.ru start #{port_option} #{args}"
command.prepend "export JOB_PATH=#{options[:job_path]}; " if options[:job_path]
system(command)
end