title: How do I get this python script working on heroku? (The browser throws up '404 Not Found')
body: <p>I am completely new to both Python and Heroku... I am trying to communicate with xively.com using the python script included below.</p>
  
  <p>This script seems to work fine locally-it performs its intended function when I execute 'foreman start'.</p>
  
  <p>But when I deploy the app and try and open the URL provided by Heroku, the browser throws up:</p>
  
  <blockquote>
    <p>404 Not Found The requested URL was not found on the server.</p>
  </blockquote>
  
  <p>The corresponding entry in the Heroku log is:</p>
  
  <blockquote>
    <p>heroku[router]: at=info method=GET path=/ host=......
    request_id=...... fwd="....." dyno=web.1 connect=1ms service=13ms
    status=404 bytes=384</p>
  </blockquote>
  
  <pre><code>#script to GET and PUT data to xively.com
  import os
  from flask import Flask
  import xively
  
  app = Flask(__name__)
  
  key = 'FEED_KEY'  
  feedid = 'FEED_ID'  
  
  print "Starting Xively tutorial script"
  
  client = xively.XivelyAPIClient(key) 
  feed = client.feeds.get(feedid)
  datastream = feed.datastreams.get("datastream1")
  
  lev = datastream.current_value
  
  client1 = xively.Client(key)  
  datastream = xively.Datastream(id="datastream2", current_value= lev)  
  client1.put('/v2/feeds/'+feedid, data={'datastreams': [datastream]}) 
  </code></pre>
  
  <p>I think it might have something to do with the absence of a statement such as:
  <code>@app.route('/')</code>            ...in the script. I have tried to fix it by including <code>@app.route('/')</code> in the script but then the script just doesn't work. Am I supposed to include the site URL in the statement? </p>
  
  <p>I would really appreciate any help I could get...</p>