How to Display a List of Files from a Folder on the server

I do understand that Webcore is generating javascript which runs on the client. But having used php for years I am missing the convenience of writing server side code as well.

How can list files on a server folder ?

  1. Is there a tool ?
  2. Could I inject a php generated fragment into the html ?

The TMS WEB Core app is a client app and runs in the browser. It cannot access files on the server (would be a huge security breach if that were possible).
To show files on a server, one typically creates a REST endpoint that allows the web client app to perform a HTTP request to the end point (possibly written in PHP) that returns the needed server side info and the client can then display it.