Skip to content

rsphing/see

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

see Build Status

see is a static web server, developed using rust.

Features

Install

Use

Quick Start

see start
# or
see start 8080

Start according to the configuration file

see
# or
see -c /your/config.yml

More

USAGE:
    see [OPTIONS] [FLAGS] [--] ...

FLAGS:
    -d                  Running in the background
    -h, help            Print help information
    -s, stop            Stop the daemon
    -t                  Check the config file for errors
    -v, version         Print version number

OPTIONS:
    -c    <FILE>        Specify a configuration file
    start <PORT?>       Quick Start

Config

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

Complete configuration file example:

- server:
    host: domain.com      # Domain name to be bound
    listen: 80            # Port to be monitored
    root: /root/www       # Directory that requires service
    index: index.html     # Index file
    directory:            # Whether to display the file list
      time: true
      size: true
    header:               # Header in response
      Access-Control-Allow-Origin: "*"
      Set-Cookie: "12345"
    rewrite:              # Default 302 
      /img: /images 301
      /url: https://example.com 302
      /html: /index.html path
    compress:             # File type that needs to be compressed
      mode: gzip
      extension:
        - css
        - js
    method:               # Method of allowing requests
      - POST
      - PUT
    auth:                 # Http user and password verification
      user: name
      password: pwd
    extension:            # Sets file extension fallbacks
      - html
      - htm
    error:                # Custom error page
      404: 404.html
      500: 500.html
    log:                  # Log save location
      error: /logs/error.log
      success: /logs/success.log
# More server ...

About

Static file server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 99.3%
  • HTML 0.7%