Skip to content

πŸš€ A tiny command line app with no external dependencies for serving any directory as a static server

License

Notifications You must be signed in to change notification settings

tinacious/static-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

static-server

static-server is a simple command line app written in Go that serves your current working directory as a static server.

Installation

Install the CLI tool:

go install github.com/tinacious/static-server@latest

Usage

Run the static-server command in any directory you'd like to serve as a web server.

If you have the following directory test:

test
β”œβ”€β”€ index.html
└── style.css

You can do:

cd test
static-server

This should serve the contents on a random port.

Custom port

You can configure the port by passing it as an environment variable. For example, to run on port 1337 run:

PORT=1337 static-server

Uninstall

Open ~/go/bin and delete static-server.

About

πŸš€ A tiny command line app with no external dependencies for serving any directory as a static server

Topics

Resources

License

Stars

Watchers

Forks

Languages