text: from os import getenv
  from bottle import Bottle, TEMPLATE_PATH,  run
  from basic_rate.controller import Controller
  
  app = application = Bottle()
  TEMPLATE_PATH.insert(0, getenv('TEMPLATE_PATH') or 'basic_rate/views')
  
  app.route('/', 'GET', Controller().index)
  app.route('/', 'POST', Controller().avg_handler)
  
  @app.error(404)
  def error404(error):
      return Controller().error404_handler()
  
  def main():
      run(app, host='0.0.0.0', port=8080, debug=True, reloader=True)
  
  if __name__ == '__main__':
      main()