swift-web

0.0.2

Web server serving local files
adam-fowler/swift-web

What's New

v0.0.2

2021-12-04T07:36:13Z
  • Resolve folders as index.html inside the folder
  • Add --hostname parameter to set host name to bind to

swift-web

A web server serving local static files.

Installation

Using Mint

The easiest way to install swift-web is via mint.

mint install adam-fowler/swift-web

Using Swift Package Manager

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

Running

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

Description

  • Swift Tools 5.5.0
View More Packages from this Author

Dependencies

Last updated: Fri Oct 18 2024 18:53:42 GMT-0900 (Hawaii-Aleutian Daylight Time)