{"id":16195129,"url":"https://github.com/ashcrow/go-serv","last_synced_at":"2025-04-07T15:54:04.225Z","repository":{"id":29204251,"uuid":"32735593","full_name":"ashcrow/go-serv","owner":"ashcrow","description":"Simple web application server library built upon Go's net/http and doesn't force any framework.","archived":false,"fork":false,"pushed_at":"2015-08-17T19:02:20.000Z","size":2072,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T18:34:56.278Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ashcrow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-23T14:02:10.000Z","updated_at":"2023-02-05T13:48:10.000Z","dependencies_parsed_at":"2022-08-17T20:05:20.729Z","dependency_job_id":null,"html_url":"https://github.com/ashcrow/go-serv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashcrow%2Fgo-serv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashcrow%2Fgo-serv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashcrow%2Fgo-serv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashcrow%2Fgo-serv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashcrow","download_url":"https://codeload.github.com/ashcrow/go-serv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247685594,"owners_count":20979084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T08:26:21.144Z","updated_at":"2025-04-07T15:54:04.205Z","avatar_url":"https://github.com/ashcrow.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-serv\n[![GoDoc](http://godoc.org/gopkg.in/ashcrow/go-serv.v0?status.png)](http://godoc.org/gopkg.in/ashcrow/go-serv.v0)\n[![Travis](https://travis-ci.org/ashcrow/go-serv.svg?branch=master)](https://travis-ci.org/ashcrow/go-serv)\n\ngo-serv attempts to take care of common requirements for web applications while not dictating any specific Go web framework. \n\nRepo: https://github.com/ashcrow/go-serv/\n\n**Warning**: Currently in development with no official release yet.\n\n## Features\n\n* Built on Go's net/http library\n* Framework agnostic\n* Logging via logrus (https://github.com/Sirupsen/logrus/)\n* Configuration file parsing via TOML (https://github.com/toml-lang/toml/)\n* Flags through pflag (https://github.com/ogier/pflag)\n* Command line flags which can overrule configuration file\n* Simple status/health system for exposing structs\n* Run HTTP and HTTPS servers with the same binary.\n\n### Installation\n```bash\n$ go get gopkg.in/ashcrow/go-serv.v0\n```\n\n### Unittesting\n```bash\n$ go test -v -cover\n```\n\nor\n\n```bash\n$ make test\n```\n\n### Configuration File Example\n```plain\n# Note that the names are the same across the BaseConfiguration\n# struct, this config file, and command line flags.\nBindAddress = \"127.0.0.1\"\nBindPort    = 8000\nLogLevel    = \"info\"\nLogFile     = \"/tmp/out.log\"\n```\n\n### Default Command Line Flags\n\n#### Application Defaults\n```bash\n$ ./status-example -help\nUsage of ./status-example:\n  --BindAddress=\"0.0.0.0\": Bind address.\n  --BindHttpsPort=443: HTTPS bind port.\n  --BindPort=80: HTTP bind port.\n  --CertFile=\"\": Cert file.\n  --KeyFile=\"\": Key file.\n  --LogFile=\"\": Log file.\n  --LogLevel=\"info\": Log level.\n  --MaxHeaderBytes=1048576: Max header bytes.\n  --ReadTimeout=10s: Read timeout.\n  --WriteTimeout=10s: Write timeout.\n```\n\n#### Configuration File Defaults\n```bash\n$ ./status-example -help /path/to/conf.toml\nUsage of ./status-example:\n  --BindAddress=\"127.0.0.1\": Bind address.\n  --BindHttpsPort=8181: HTTPS bind port.\n  --BindPort=8000: HTTP bind port.\n  --CertFile=\"./cert.pem\": Cert file.\n  --KeyFile=\"./key.pem\": Key file.\n  --LogFile=\"/tmp/out.log\": Log file.\n  --LogLevel=\"info\": Log level.\n  --MaxHeaderBytes=1048576: Max header bytes.\n  --ReadTimeout=10s: Read timeout.\n  --WriteTimeout=10s: Write timeout.\n```\n\n## Examples\nExamples can be found in the [examples folder](https://github.com/ashcrow/go-serv/tree/master/examples)\n\n### Building Examples\n\nThere is a Makefile provided to build the code in the examples folder.\n\n```bash\n$ make build-examples-all\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashcrow%2Fgo-serv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashcrow%2Fgo-serv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashcrow%2Fgo-serv/lists"}