goserve

command module
v0.0.0-...-55d983f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2017 License: GPL-3.0 Imports: 7 Imported by: 0

README

goserve Documentations Travis CI results

goserve is a small utility to serve static HTML files in a directory to a given port.

It is intented for developer who wants a quick access to their code through browser. Especially so when their code are not using relative path in link / image / CSS what so ever. Just compile the binary and put it in your PATH, then it is good to go.

The code is dead simple. I simply don't want to write it all the time. And I wish it might be of help to you, too.

Requirement

goserve requires only the core go libraries. No need to go get anything other than this.

Installation

If you have set GOPATH/bin to your PATH, you may install and use this by:

go get -u github.com/go-serve/goserve

Alternatively, you may compile and copy the binary to your directory in PATH.

git clone https://github.com/go-serve/goserve.git
cd goserve
go build
cp goserve YOUR_DIR_IN_PATH/.

Usage

Just type this, a server will be serving the files in the current directory to default port 8080:

goserve

To specify the directory, you may add 1 directory path as the argument:

goserve ./data

You may specify the port with environment variable PORT:

PORT=8123 goserve ./data

You may manually override the default or PORT with -port parameter:

goserve -port=8123 ./data

Author

This software is written by Koala Yeung (koalay at gmail.com).

Licence

This software is licenced under GPL v3. You may obtain a copy of the licence in the LICENSE file in this repository.

Bug Report

You are always welcome to report issue here: https://github.com/go-serve/goserve/issues

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL