https://github.com/softprops/unplanned
instant http
https://github.com/softprops/unplanned
Last synced: about 1 year ago
JSON representation
instant http
- Host: GitHub
- URL: https://github.com/softprops/unplanned
- Owner: softprops
- Created: 2011-01-20T06:23:18.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2012-05-09T23:44:28.000Z (about 14 years ago)
- Last Synced: 2025-03-17T12:00:05.685Z (over 1 year ago)
- Language: Scala
- Homepage:
- Size: 95.7 KB
- Stars: 21
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# unplanned
My simple answer to `python -m SimpleHTTPServer` using [unfiltered](https://github.com/n8han/Unfiltered/)
## install
Create a [conscript](https://github.com/n8han/conscript/#README)
cs softprops/unplanned
This will create an executable called `up` in `~/usr/bin`
or you can go old school and create a self contained executable by hand
git clone git://github.com/softprops/unplanned.git && cd unplanned
sbt update assembly
cp target/scala_2.8.1/unplanned.jar path/to/somewhere/in/$PATH
# put it in a shell script
echo 'java -Xmx512M -jar `dirname $0`/unplanned.jar "$@"' > path/to/somewhere/in/$PATH/up
## usage
serve anything from anywhere
cd path/to/anywhere/
up
This will start an http server serving static content from your current directory* on `0.0.0.0:{the_next_available_port}`
cd path/to/anywhere/
up -p 1234
This will start an http server the same as above but with an explicit port `1234`
* The directory must be writable. The unplanned server writes an empty temp file in the current working directory called `.here` for context
doug tangren (softprops) 2011