https://github.com/thoughtscript/simple-go-server
Simple Static File Server in Go
https://github.com/thoughtscript/simple-go-server
golang
Last synced: 10 months ago
JSON representation
Simple Static File Server in Go
- Host: GitHub
- URL: https://github.com/thoughtscript/simple-go-server
- Owner: Thoughtscript
- Created: 2024-09-13T02:15:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-11T00:47:17.000Z (about 1 year ago)
- Last Synced: 2025-01-24T14:44:58.158Z (about 1 year ago)
- Topics: golang
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Go Server
[](https://golang.org/pkg/)
## Regular Use
Locally, with GoLang installed:
```bash
bash run.sh
```
## Docker
```bash
docker build .
docker images
docker run -p 8888:8888 sha256:2296c6ce739b9e80a963cbee76d7d64c47cef35a7e151e5857cebb63e2b6ab2b
```
## Endpoints
1. [localhost:8888/heartbeat](http://localhost:8888/heartbeat)
* Simple String to HTML writeout representing a dummy Heart Beat / Status / Test endpoint.
1. [http://localhost:8888/public/](http://localhost:8888/public/)
* Also: [http://localhost:8888/public/index.html](http://localhost:8888/public/index.html)
* Simple HTML Static File Serve
1. [http://localhost:8888/stop](http://localhost:8888/stop)
* Immediately terminate the application.
* Note that calling `os.Exit(0)` in the main Process will also terminate each Go Routine.