https://github.com/benbjohnson/locald
A simple HTTP server for serving static files out of the current directory.
https://github.com/benbjohnson/locald
Last synced: 10 months ago
JSON representation
A simple HTTP server for serving static files out of the current directory.
- Host: GitHub
- URL: https://github.com/benbjohnson/locald
- Owner: benbjohnson
- Created: 2013-04-07T18:23:37.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-04-07T20:54:54.000Z (almost 13 years ago)
- Last Synced: 2025-03-15T23:56:14.492Z (10 months ago)
- Size: 152 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
locald
======
### Overview
Ever need to run an HTTP server to serve static content out of a directory for testing?
Well, me too!
That's what locald does.
In fact, that's all it does.
Even better is that it doesn't have any dependencies outside of Go.
Once you build the server you end up with a nice single, statically compiled binary.
### Getting Started
To get started, make sure you install [Go](http://golang.org/) and then build the server:
```sh
$ go build
```
Now you have a `locald` executable in your current directory! Woohoo!
Run it like so:
```sh
$ ./locald
locald v0.1.0
Serving /your/current/path on http://localhost:9000
```
The server is dead simple so there's not a lot of options.
Actually... there's just one.
You can specify the port using the `-p PORT` or `--port PORT` command line arguments.
By default it'll use port 9000.
### Contributions
Unless you can think of a way to make this server any simpler then you probably shouldn't bother submitting a pull request.
It's meant to be simple.
If you need more features then fork the code or use ~~Apache~~ Nginx.