Skip to content

jaywcjlove/sgo-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

简体中文 sgo Nodejs

Using my app is also a way to support me:
Scap: Screenshot & Markup Edit Screen Test Deskmark Keyzer Vidwall Hub VidCrop Vidwall Mousio Hint Mousio Musicer Audioer FileSentinel FocusCursor Videoer KeyClicker DayBar Iconed Menuist Quick RSS Quick RSS Web Serve Copybook Generator DevTutor for SwiftUI RegexMate Time Passage Iconize Folder Textsound Saver Create Custom Symbols DevHub Resume Revise Palette Genius Symbol Scribe

sgo logo

Buy me a coffee Follow On X CI Releases

This is a tool designed to help you serve static websites, single-page applications, or static files, whether they are on your device or on a local network. It is the Rust version of sgo, rewritten in Rust.

Additionally, it provides a neat interface for listing directory contents:

sgo

Installation

brew install jaywcjlove/tap/sgo
# Uninstall
brew uninstall jaywcjlove/tap/sgo

Usage

sgo -d target -p 3001

Command help

$ sgo --help

sgo - Static file serving and directory listing

Usage: sgo [OPTIONS]

Options:
  -d, --dir <DIRECTORY>     Sets the directory to serve files from [default: ./static]
  -p, --port <PORT>         Sets the port number to listen on [default: 3030]
  -L, --no-request-logging  Do not log any request information to the console
  -C, --cors                Enable CORS, sets `Access-Control-Allow-Origin` to `*`
  -h, --help                Print help
  -V, --version             Print version

Development

cargo run   # Run the server, open http://127.0.0.1:3030/ in the browser
cargo build # Compile the project
cargo build --release # Compile the release version

cargo build --target aarch64-apple-darwin --release
cargo build --target aarch64-apple-ios --release
cargo build --target aarch64-apple-ios-sim --release

Compilation output directory

└── target
    ├── debug
    │   └── sgo // Binary file output from build
    └── release
        └── sgo // Binary file output from release

License

MIT © Kenny Wong

About

Static file serving and directory listing

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors