https://github.com/nullfx/simplegohttpd
a simple go based http daemon that reads serves file content. more of a learning exercise than anything useful
https://github.com/nullfx/simplegohttpd
Last synced: 8 months ago
JSON representation
a simple go based http daemon that reads serves file content. more of a learning exercise than anything useful
- Host: GitHub
- URL: https://github.com/nullfx/simplegohttpd
- Owner: nullfx
- License: mit
- Created: 2021-03-18T04:23:07.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-12T07:59:37.000Z (over 2 years ago)
- Last Synced: 2024-06-21T04:55:50.144Z (almost 2 years ago)
- Language: Go
- Size: 197 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Another Simple go httpd Web Server
A simple go based http daemon that reads serves file content.
This is more of a learning exercise than anything useful.
Loads static content from local directory and writes it out based on uri path. If no file matches URI path, returns a 404 page.
Includes [SB Admin](https://github.com/startbootstrap/startbootstrap-sb-admin) bootstrap template as content that it loads and serves.
## Build
```
go build httpd.go
```
### Run
browse http://localhost:82/index.html or http://localhost/foo
## Structure
- **httpd.go** - webserver code. webserver doesn't use any of the built in template functionality (yet. crawl. walk. run. still crawling). wanted to start with a very basic i/o implementation and build from there.
- **www** - static html directory. anything placed in this directory will be served if matching the url path. extract the contents of `sb_admin_sample_content.zip` in place here to run the `SB Admin` demo using this web server.