Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thedevminertv/gostatic
Probably the fastest (and simplest) way to serve static files.
https://github.com/thedevminertv/gostatic
fiber go http static
Last synced: 19 days ago
JSON representation
Probably the fastest (and simplest) way to serve static files.
- Host: GitHub
- URL: https://github.com/thedevminertv/gostatic
- Owner: TheDevMinerTV
- Created: 2022-11-18T10:17:12.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-02T00:19:43.000Z (about 1 month ago)
- Last Synced: 2024-10-10T21:15:43.023Z (about 1 month ago)
- Topics: fiber, go, http, static
- Language: Go
- Homepage:
- Size: 101 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GoStatic
Probably the fastest (and simplest) way to serve static files.
```bash
docker run --rm -p 8080:80 -v $PWD:/static:ro ghcr.io/thedevminertv/gostatic
```Additionally, you can add the following flags:
```bash
-cache # Enable caching
-compress-level # Enable compression (-1=remove module, 0=none, 2=best)
-log-requests # Log requests (this will slow down the server by ~40%)
-index # The file to serve when the path ends in `/` (default=index.html)
-spa # Make all 404 pages the index file, useful for SPA apps that use client side routing
-download # Enable downloading files
```You can just add these to the end of the `docker run` command.