https://github.com/citadelofcode/proteus
A versatile web server framework written in Go.
https://github.com/citadelofcode/proteus
golang http-server routing web-server
Last synced: 3 months ago
JSON representation
A versatile web server framework written in Go.
- Host: GitHub
- URL: https://github.com/citadelofcode/proteus
- Owner: citadelofcode
- License: mit
- Created: 2024-04-02T18:20:46.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-29T00:08:10.000Z (7 months ago)
- Last Synced: 2025-06-29T01:26:49.507Z (7 months ago)
- Topics: golang, http-server, routing, web-server
- Language: Go
- Homepage:
- Size: 2.16 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

 
`Proteus` is a versatile web server framework written using Go.
## Testing
To run all the test scripts available in the module, execute the below `Makefile` command.
```bash
make test
```
To run a specific test script file, run the following command.
```bash
make testfile FILE=./test/body_parser_test.go
```
Replace `./test/body_parser_test.go` with the path of the test script file you want to execute.
## Example Usage
To work with creating a HTTP server and process incoming requests, add the below import statement at the top of your Go file.
```go
import "github.com/citadelofcode/proteus"
```
Once the import statement is included, use the below statement to create a new instance of a web server to handle incoming HTTP requests.
```go
server := proteus.NewServer()
```
Please note that, the above statement merely creates an instance of the web server. To make it listen for incoming requests, use the **Listen()** method of the server instance, as given below.
```go
server.Listen(8080, "localhost")
```
The **Listen()** method accepts two arguments - the port number where the server will listen for incoming requests and the hostname of the machine where the server instance is running.
## HTTP Version Compatibility
The `proteus` web server supports the below HTTP versions.
- [HTTP/0.9 & HTTP/1.0 - RFC 1945](https://datatracker.ietf.org/doc/html/rfc1945)
- [HTTP/1.1 - RFC 2616](https://datatracker.ietf.org/doc/html/rfc2616#autoid-45)
## HTTP Response Status Codes
The list of status codes supported by the `proteus` web server are compliant with the list of codes registered with `IANA`.
[IANA HTTP Status Code](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml)