loading...

URL Parameters in Flask vs Express

victoromondi1997 profile image VICTOR OMONDI ・1 min read

Flask

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

Express

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

Discussion

pic
Editor guide