how to get the last element in the resource path(parameter) - hogehoge666/syno_moments_slider GitHub Wiki

  • Assume your API looks like this, and you want to get the "id" value.
http://some.url.com/api/user/<id>
  • Use request.params.
  • Don't forget the colon in front of "id".
app.get('/api/user/:id', (request, response) => {
    const userId = request.params.id;