'Is there a way to load HTML/JS files with Vapor in a local iOS Webserver?

I have created a simple game in JS and now I am trying to implement it in an iOS app. The best way I could think of doing that is by running a local Webserver in the iOS App using Vapor. But I don't really know how to load my existing HTML/JS files.



Solution 1:[1]

You can use the FileMiddleware to serve static assets from a Vapor server, including existing JS and HTML files

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 0xTim