title: Creating a basic RESTful design
body: <p>I need to Create the following... a basic web service using the RESTful design pattern to implement the following URIs:</p>
  
  <pre class="lang-none prettyprint-override"><code>http://localhost/hello?name=”world”
  </code></pre>
  
  <p>The above URI should return the following JSON-format text:</p>
  
  <pre class="lang-json prettyprint-override"><code>{ hello: “world” }
  </code></pre>
  
  <p>but I am having trouble trying to figure this out and where to place it among the code that has already been created.</p>
  
  <pre class="lang-python prettyprint-override"><code>#!/usr/bin/python
  import json
  from bson import json_util
  import bottle
  from bottle import route, run, request, abort
  
  # set up URI paths for REST service
  @route('/currentTime', method='GET')
  def get_currentTime():
      dateString=datetime.datetime.now().strftime("%Y-%m-%d")
      timeString=datetime.datetime.now().strftime("%H:%M:%S")
      string="{\"date\":"+dateString+",\"time\":"+timeString+"}"
      return json.loads(json.dumps(string, indent=4,default=json_util.default))
  
  if __name__ == '__main__':
      #app.run(debug=True)
      run(host='localhost', port=8080)
  </code></pre>