Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ysugimoto/go-static-server
Golang local static server for development
https://github.com/ysugimoto/go-static-server
Last synced: 3 months ago
JSON representation
Golang local static server for development
- Host: GitHub
- URL: https://github.com/ysugimoto/go-static-server
- Owner: ysugimoto
- License: mit
- Created: 2014-09-28T17:55:44.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-05-21T19:39:48.000Z (over 4 years ago)
- Last Synced: 2024-07-16T14:03:57.778Z (4 months ago)
- Language: Go
- Size: 6.08 MB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go Static Server
Static server for development
## Usage
Clone or download this repostory and use `build/` binary for your operating system.
### Windows
```
./build/windows/go-static-server.exe
```### Linux
```
./build/linux/go-static-server
```### Mac OS
```
./build/darwin/go-static-server
```Build binary is supported 64-bit only.
## Command Line options
- `-p` Listen port number ( default is 8888)
- `-d` Change DocumentRoot (default is current directory)for example:
```
go-static-server -p 9999 -d ~/server
```Will listen `0.0.0.0:9999` and document root is `$HOME/server`.
## Supported extension (MimeTypes)
| Extension | Description | Serve mimetypes |
| ---------- |:-------------------:|:------------------------:|
| .html/.htm | HTML Document | text/html |
| .css | StyleSheet Document | text/css |
| .js | JavaScript Source | application/javascript |
| .json | JSON Source | application/json |
| .gif | GIF Image | image/gif |
| .jpg/.jpeg | JPEG Image | image/jpeg |
| .png | PNG Image | image/png |
| .txt | Plain Text | text/plain |
| (other) | Octet-Stream | application/octet-stream |