1

I'm using the express 4.0 framework for node.js

I have a simple server defined as follows

require('express')().get('/:path*', (req, res) => res.send(req.params.path)).listen(8082);

If submit a get request to "localhost:8082/a/b/c", it should return

a/b/c

but instead it returns

a

I'm following the * syntax from this guide

Ryan White
  • 2,366
  • 1
  • 22
  • 34

1 Answers1

1

Express 4.0 use old version of path-to-regexp : 0.1.7. Now version is 1.2.1 If you update this module you will receive your expect

trquoccuong
  • 2,857
  • 2
  • 20
  • 26