Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

wyhaya/see

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

see

GitHub Workflow Status Crates.io LICENSE


A simple and fast web server

Features

  • Supported HTTP/1 and HTTP/2
  • Content compression (auto, gzip, deflate, br)
  • Support directory list
  • HTTP request proxy
  • ...

Install

Binary

Download the binary from the release page

Cargo

cargo install see
# or
cargo install --git https://github.com/wyhaya/see

Docker

docker pull wyhaya/see
Example

Add the following to config.yml

- server:
    listen: 80
    echo: Hello world
mkdir your-config && vim your-config/config.yml

Run container

docker run -idt --name see -p 80:80 -p 443:443 -v your-config:/.see wyhaya/see

Open http://127.0.0.1 and you should see hello world.

Usage

Quick start in current directory

see start

Use specified port and directory

see start -b 0.0.0.0:80 -p /root/www

Config

Use yaml format as a configuration file, You can use see -c config.yml to specify the configuration file location

The default configuration file is in ~/.see/config.yml

A simple example:

- server:
    listen: 80
    root: /root/www

- server:
    listen: 443
    root: /root/www
    host: example.com
    https:
      key: ./ssl.key
      cert: ./ssl.pem

Click to view document