https://github.com/no-src/fserver
https://github.com/no-src/fserver
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/no-src/fserver
- Owner: no-src
- License: apache-2.0
- Created: 2023-07-28T04:14:02.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-11-25T01:36:10.000Z (7 months ago)
- Last Synced: 2025-11-28T11:52:24.434Z (7 months ago)
- Language: Go
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# fserver
[](https://github.com/no-src/fserver/actions)
[](https://github.com/no-src/fserver/blob/main/LICENSE)
[](https://pkg.go.dev/github.com/no-src/fserver)
[](https://goreportcard.com/report/github.com/no-src/fserver)
[](https://github.com/no-src/fserver/releases)
## Installation
```bash
go get -u github.com/no-src/fserver
```
## Quick Start
```go
package main
import (
"embed"
"github.com/no-src/fserver"
"github.com/no-src/log"
)
// webDist the web dist resource
//
//go:embed dist
var webDist embed.FS
func main() {
defer log.Close()
exit, port := fserver.InitFlag(printVersion, printAboutInfo)
if exit {
return
}
fserver.Run(port, "/dist", webDist)
}
func printVersion() {
log.Log("version info")
}
func printAboutInfo() {
log.Log("about info")
}
```