Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VictorOmondi1997/1b74969ceb6492e121124af05615ced4 to your computer and use it in GitHub Desktop.
Save VictorOmondi1997/1b74969ceb6492e121124af05615ced4 to your computer and use it in GitHub Desktop.
URL Parameters in Flask vs Express

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;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment