URL Parameters in Flask vs Express

Flask

@app.route('/api/v1/users/<user_id>')
def handler(user_id):
    # route handler    # use user_id 

Enter fullscreen mode Exit fullscreen mode

Express

app.get('/api/v1/users/:userId', (req, res) => {
    // route handler
   const userId = req.params.userId;
});

Enter fullscreen mode Exit fullscreen mode

原文链接:URL Parameters in Flask vs Express

© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容