Skip to content

M336G/static_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Server

Lightweight & superfast static file server supporting in-memory caching

Even supports nested paths!

Prerequisites

  • A device or server capable of running 24/7

Running

Downloading from the releases tab

1. Download the corresponding archive for your OS and extract it:

2. Create a .env file and fill it according to your needs using .env.example as a template

3. Run the executable to start your instance

Building manually

1. Install Rust, then download the repository manually or clone it:

git clone https://github.com/M336G/static_server.git
cd static_server

2. Create a .env file and fill it according to your needs using .env.example as a template

3. Start the instance with:

  • cargo run --release for production
  • cargo run for development/testing

Once you've done all of this, you should have a running instance!

Usage

Once your instance is running, you can use:

  • GET / - to check if your server's alive
  • GET /<path/to/file> - to serve any file within your STORAGE_DIRECTORY, including files in subdirectories

License

This project is licensed under the MIT License.

About

Lightweight & superfast static file server supporting in-memory caching

Resources

License

Stars

Watchers

Forks

Contributors

Languages