A web server serving local static files.
The easiest way to install swift-web is via mint.
mint install adam-fowler/swift-web
git clone https://github.com/adam-fowler/swift-web
swift build -c release
And then copy .build/release/swift-web
to a folder in your $PATH
To serve files from the current folder run
swift web
This 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