Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jaywcjlove/sgo-rs

Static file serving and directory listing
https://github.com/jaywcjlove/sgo-rs

cli http http-server rust server service

Last synced: 3 months ago
JSON representation

Static file serving and directory listing

Awesome Lists containing this project

README

        

[English](./README.md) • [sgo](https://github.com/jaywcjlove/sgo) Nodejs



sgo logo



CI


Releases

这是一款工具,旨在帮助你为静态网站、单页应用程序或静态文件提供服务,无论它们是在你的设备上还是在本地网络上。它是 [sgo](https://github.com/jaywcjlove/sgo) 的 Rust 版本,并基于 Rust 重新编写。

此外,它还提供了一个整洁的界面,用于列出目录内容:

sgo


### 使用

```sh
sgo -d target -p 3001
```

### Command help

```sh
$ sgo --help

sgo - Static file serving and directory listing

Usage: sgo [OPTIONS]

Options:
-d, --dir Sets the directory to serve files from [default: ./static]
-p, --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
```


### 开发

```sh
cargo run # 运行服务器,在浏览器中打开 http://127.0.0.1:3030/
cargo build # 编译项目
cargo build --release # 编译输出发布版本

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

编译输出目录

```rs
└── target
├── debug
│   └── sgo // build 输出的二进制文件
└── release
└── sgo // release 输出的二进制文件
```


### License

MIT © [Kenny Wong](https://wangchujiang.com/)