Skip to content

EricNeid/go-webserver

Repository files navigation

Go Report Card Test Go Doc Release Gitpod ready-to-code

About

A super simple webserver, written in go.

Based on: https://marcofranssen.nl/go-webserver-with-graceful-shutdown/

Quickstart

The simples way to compile this application is to use the provide makefile. It provides cross compilation to linux and windows and makes use of docker.

Docker:

make build-windows
make build-linux

Manual and without docker:

go build -o ./out/ ./cmd/mapprovider/

Start server:

./webserver -listen-addr=:80 -base-path=foo

Options

Application can be configure using command line arguments or environment variables or a combination of both.

  • listen-addr/LISTEN_ADDR - listing address, ie. ":5000"
  • base-path/BASE_PATH - base path to serve application, ie "/custom"

Example:

./webserver -base-path webserver-0.1.0 -listen-addr :8080

Endpoints

The following endpoints are available, assuming the configuration is not changed.

Testing

To run tests:

make test

Question or comments

Please feel free to open a new issue: https://github.com/EricNeid/go-webserver/issues

About

No description, website, or topics provided.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published