I am not able to get the http://127.0.0.1:5000/user1 Url from the browser every time it gives 404 and for the http://127.0.0.1:5000 it gives old output which I have tried (some other string "Hello flask") instead of "hello world" I have tried closing my IDE and trying again even I have created another project but the problem still persist
Thanks in advance!
#imports
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'hello world!'
#add users to collection "app_users"
@app.route('/user1',methods=['POST'])
def add_user():
if not request.json or not 'email_id' in request.json:
abort(404)
print("processing")
insert(request)
return flask.jsonify({'status': "inserted successfully"}), 201
if __name__ == '__main__':
app.run()