Normalizes a base-path value to a prefix with no trailing slash: '' for /, '/api' for /api/ or /api. Throws on a value that does not start with /, since Express would mount it nowhere.
''
/
'/api'
/api/
/api
Normalizes a base-path value to a prefix with no trailing slash:
''for/,'/api'for/api/or/api. Throws on a value that does not start with/, since Express would mount it nowhere.