Sign inSign up

kevingimbel/goserve

By kevingimbel

•Updated almost 9 years ago

Static file server written in Go.

Image
0

451

kevingimbel/goserve repository overview

⁠goserve

Static file server written in go.

Build Status

⁠Installation

⁠From archive

Go to the release page⁠ and download a binary for your operating system. goserve is build for Windows, MacOS and Linux with goreleaser⁠.

⁠From source
  1. Install Go⁠.
  2. Clone the repo git clone https://github.com/kevingimbel/goserve.git
  3. Run go build goserve.go from within the new directory.

Place the binary somewhere in your $PATH, e.g.

  $ sudo ln -s $(pwd)/goserve /usr/local/bin
⁠Usage

goserve can be used from the command line as follows:

  $ goserve [-port ""] [-cors ""] [-verbose]

This will serve the current directory to localhost:8000 or the specified port. -verbose logs each request to Stdout. With -cors a Access-Control-Allow-Origin header can be set. For local development this can be * to allow all connections.

  $ goserve -port 8000 -cors "*"

See also goserve -help.

⁠Test it

To test the server run goserve from the project directory and open localhost:8000/example⁠.

Tag summary

Content type

Image

Digest

Size

12.1 MB

Last updated

almost 9 years ago

docker pull kevingimbel/goserve