SimpleSwiftServer

4.3.1

A Swift executable equivalent to Python's SimpleHTTPServer — plus more!
Samasaur1/SimpleSwiftServer

What's New

Version 4.3.1: URL-decode file paths before attempting to open them

2021-10-25T19:43:16Z

This allows webserver mode to correctly open files with space characters in them, along with other characters.

What's Changed

  • URL-decode file paths before attempting to open them by @Samasaur1 in #11

Full Changelog: v4.3.0...v4.3.1

Server

A Swift executable equivalent to Python's SimpleHTTPServer — with extra features!

Installing

Make sure Xcode 10.2 or higher is installed first.

Homebrew

$ brew install Samasaur1/core/simpleswiftserver

Mint

Install

$ mint install Samasaur1/SimpleSwiftServer
Update
$ mint install Samasaur1/SimpleSwiftServer

Swift Package Manager

Use CLI

$ git clone https://github.com/Samasaur1/SimpleSwiftServer.git
$ cd SimpleSwiftServer
$ swift run server

Usage

SimpleSwiftServer 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

$ server

Opens a directory browser from the current directory on port 4321

$ server 4321

Opens a directory browser from the Desktop subdirectory on port 1234

$ server --browse Desktop

Opens a file downloader for the file Package.swift in the Desktop subdirectory on port 1234

$ server --file Desktop/Package.swift

Opens 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 /

Description

  • Swift Tools 4.2.0
View More Packages from this Author

Dependencies

Last updated: Thu Sep 01 2022 05:16:23 GMT-0500 (GMT-05:00)