atakanozceviz / serve

A simple file server written in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

serve

A simple file server with no dependencies.

Installation

Download the appropriate version for your platform from Releases. Once downloaded, the binary can be run from anywhere.

Ideally, you should install it somewhere in your PATH for easy use. /usr/local/bin is the most probable location.

Installing from source

(requires Go (golang) installed on your machine to build.)

$ go get -v github.com/atakanozceviz/serve

Once the get completes, you should find your serve (or serve.exe) executable inside $GOPATH/bin/.

Usage

$ Usage of serve:
  -p string
        port on which the server will listen (default "4242")
  -s string
        filesystem path to read file(s) relative from (default ".")

You can use command line argument instead of -s flag.

Example:

$ serve /path/to/a/file/or/directory

Add /u to the end of the url to upload files to the server like so:

http://[server]:4242/u

About

A simple file server written in Go


Languages

Language:Go 100.0%