Skip to content

stretchr/thru

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Thru

Worlds simplest web server.

  • Servers static files via a URL

Usage

  • Navigate to the directory of files you want to serve.
  • Type thru -o

Examples

Output to a specific port

thru :8080

Automagically open browser for me

thru -o

You can also easily run multiple thru instances this way. thru will automatically select an open port and start serving the directory.

Bind to a specific I.P. address

thru 127.0.0.1

Bind to a specific I.P. address, with specific port, and open browser

thru 127.0.0.1:3000 -o

Get thru

Download the latest version of thru by navigating the build directory. Or see if the version you want is in this list:

Download the file somewhere nice (like /usr/bin), and ensure it is added to your PATH so you can use it in the command line.

Build your own

If you want to build your own:

  • Get the repo
  • Make sure you have Go installed
  • Do go build
  • Put the thru output file in some nice bin folder (like /usr/bin) and add it to your PATH

About

The worlds simplest web server

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages