3

I'm trying to run this application on a different port(8080). I tried putting the port parameter but it doesn't seem to work.

I'm getting a 404 page, but when i switch port to 5000, I encounter no problem.

from eve import Eve
app = Eve()

@app.route("/hello", methods=['GET'])
def hello():
    return "Hello World!"

if __name__ == '__main__':
    app.run(port=8080, debug=True)
olleh
  • 1,248
  • 5
  • 16
  • 43
  • (venv)jiii@jiii-jump:~/www/eve2$ python run.py * Running on http://127.0.0.1:8080/ * Restarting with reloader 127.0.0.1 - - [08/May/2014 11:52:54] "GET / HTTP/1.1" 404 - 127.0.0.1 - - [08/May/2014 11:53:09] "GET /people HTTP/1.1" 404 - – olleh May 08 '14 at 03:58

1 Answers1

2

Make sure that SERVER_NAME = None (which is the default) is set in your settings file.

Nicola Iarocci
  • 6,606
  • 1
  • 20
  • 33