https://github.com/supriyo-biswas/gohttpd
A simple web server written in Go using net/http
https://github.com/supriyo-biswas/gohttpd
golang http http-server web-server
Last synced: 12 months ago
JSON representation
A simple web server written in Go using net/http
- Host: GitHub
- URL: https://github.com/supriyo-biswas/gohttpd
- Owner: supriyo-biswas
- Created: 2019-02-22T19:01:15.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-18T18:12:27.000Z (over 6 years ago)
- Last Synced: 2025-02-09T22:46:16.311Z (about 1 year ago)
- Topics: golang, http, http-server, web-server
- Language: Go
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gohttpd
Yet another HTTP web server written in Go (using net/http).
## Features
* Supports gzip compression
* Supports If-Modified-Since headers
* Supports GET and HEAD requests
* Blocks access to hidden files/directories
* Directory listing (turned off by default)
* Request logging
* No dependencies on external libraries
## Getting started
Build the binary and start it up:
```bash
go build -o httpd httpd.go
./httpd
```
By default it serves content on port 8080 and from the current directory,
although you can change this behaviour with the built-in flags (use
`./httpd -help` for details).
You can also build a static binary. As an example, on Linux/amd64, use:
```bash
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo -ldflags '-w' -o httpd_amd64 httpd.go
```
## License
[MIT](https://opensource.org/licenses/MIT)