michaelneu / webxcel

🤔 A REST backend built with plain VBA Microsoft Excel macros. Yes. Macros.
https://dev.to/michaelneu/to-vba-and-beyond---building-a-restful-backend-using-plain-microsoft-excel-macros-76n
MIT License
440 stars 70 forks source link

Provide index file array for static file server #18

Closed michaelneu closed 5 years ago

michaelneu commented 5 years ago

Fixes #14.

When creating a FileSystemWebController, you can now use the IndexFiles property to add custom index files. By default, index.html and index.htm are used:

Public Sub Main()
    Dim server As HttpServer
    Set server = New HttpServer

    Dim controller As FileSystemWebController
    Set controller = New FileSystemWebController

    controller.IndexFiles.Add "myindex.html"

    server.Controllers.AddController controller
    server.Serve 8080
End Sub