A Swift executable equivalent to Python's SimpleHTTPServer — with extra features!
Make sure Xcode 10.2 or higher is installed first.
$ brew install Samasaur1/core/simpleswiftserver$ mint install Samasaur1/SimpleSwiftServer$ mint install Samasaur1/SimpleSwiftServerUse CLI
$ git clone https://github.com/Samasaur1/SimpleSwiftServer.git
$ cd SimpleSwiftServer
$ swift run serverSimpleSwiftServer has two modes: a file downloader (to easily share files) and a directory browser. It also allows you to specify your port.
The default port is 1234, the default mode is a directory browser, and the default path is the current directory.
Opens a directory browser from the current directory on port 1234
$ serverOpens a directory browser from the current directory on port 4321
$ server 4321Opens a directory browser from the Desktop subdirectory on port 1234
$ server --browse DesktopOpens a file downloader for the file Package.swift in the Desktop subdirectory on port 1234
$ server --file Desktop/Package.swiftOpens a directory browser from the root directory on port 46264. Note: this is a terrible idea, as any confidential files (tokens, keys) are publically accessible. Share the smallest amount of your system that you need.
$ server 46264 --browse /