老师您好,为什么我在设置完路由之后 用postman去访问 都是404 not found?(get和post都不行)
app = Flask(__name__)
@app.route('/index',methods=['GET']) #定义路由,并映射一个方法
def index():
return "Hello BlockChain"
@app.route('/transactions/new',methods=['POST'])
def new_transaction():
return "We'll add a new transaction"
if __name__ == '__main__':
app.run(host='0.0.0.0',port=5000)