A web server serving local static files.
The easiest way to install swift-web is via mint.
mint install adam-fowler/swift-webgit clone https://github.com/adam-fowler/swift-web
swift build -c releaseAnd then copy .build/release/swift-web to a folder in your $PATH
To serve files from the current folder run
swift webThis will run a web server bound to port 8001. Type localhost:8001/<filename> into your web browser to view a file.
To serve files from a particular folder run
swift web <folder>You can also change the port the server uses with the --port option.
swift web <folder> --port 8080