If you release your slim4 application to a production site where you do not have setup a virtual host,
be sure to set the base path with app->setBasePath().
I have a REACT application on www.tangosweden.se
Below this I have my index.php located in subdir /app/slim4/public.
In this case I use app->setBasePath(‘/app/slim4/public’)
Then the application find my abbreviated routes that I define in routes.php.