Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Simple web application server library built upon Go's net/http and doesn't force any framework.

License

NotificationsYou must be signed in to change notification settings

ashcrow/go-serv

Repository files navigation

GoDocTravis

go-serv attempts to take care of common requirements for web applications while not dictating any specific Go web framework.

Repo:https://github.com/ashcrow/go-serv/

Warning: Currently in development with no official release yet.

Features

Installation

$ go get gopkg.in/ashcrow/go-serv.v0

Unittesting

$ gotest -v -cover

or

$ maketest

Configuration File Example

# Note that the names are the same across the BaseConfiguration# struct, this config file, and command line flags.BindAddress = "127.0.0.1"BindPort    = 8000LogLevel    = "info"LogFile     = "/tmp/out.log"

Default Command Line Flags

Application Defaults

$ ./status-example -helpUsage of ./status-example:  --BindAddress="0.0.0.0": Bind address.  --BindHttpsPort=443: HTTPSbind port.  --BindPort=80: HTTPbind port.  --CertFile="": Cert file.  --KeyFile="": Key file.  --LogFile="": Log file.  --LogLevel="info": Log level.  --MaxHeaderBytes=1048576: Max header bytes.  --ReadTimeout=10s: Read timeout.  --WriteTimeout=10s: Write timeout.

Configuration File Defaults

$ ./status-example -help /path/to/conf.tomlUsage of ./status-example:  --BindAddress="127.0.0.1": Bind address.  --BindHttpsPort=8181: HTTPSbind port.  --BindPort=8000: HTTPbind port.  --CertFile="./cert.pem": Cert file.  --KeyFile="./key.pem": Key file.  --LogFile="/tmp/out.log": Log file.  --LogLevel="info": Log level.  --MaxHeaderBytes=1048576: Max header bytes.  --ReadTimeout=10s: Read timeout.  --WriteTimeout=10s: Write timeout.

Examples

Examples can be found in theexamples folder

Building Examples

There is a Makefile provided to build the code in the examples folder.

$ make build-examples-all

About

Simple web application server library built upon Go's net/http and doesn't force any framework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp