Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chriso345/http-server-go
HTTP Server written in Go
https://github.com/chriso345/http-server-go
Last synced: about 1 month ago
JSON representation
HTTP Server written in Go
- Host: GitHub
- URL: https://github.com/chriso345/http-server-go
- Owner: ChrisO345
- License: mit
- Created: 2024-07-12T08:12:38.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-07-12T08:14:05.000Z (6 months ago)
- Last Synced: 2024-10-13T20:41:45.543Z (2 months ago)
- Language: Go
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HTTP Server in GO
Allows for the creation of a simple HTTP server that can serve files and accept POST requests to write to files.
Made following the CodeCrafter's HTTP Server challenge.
Note that this is a volatile server, and will not save files between runs.
### To Use (on Windows)
1. Run the Server File
```bash
go run app\server.go
```
2. Use `curl` to interact with the server
```bash
curl -d "Hello World" localhost:4221/files/hello.txt
```
3. Use `curl` to read the file
```bash
curl localhost:4221/files/hello.txt
```