https://github.com/martinnowak/serve
A simple HTTP server for static files.
https://github.com/martinnowak/serve
d static-server vibe-d
Last synced: 3 months ago
JSON representation
A simple HTTP server for static files.
- Host: GitHub
- URL: https://github.com/martinnowak/serve
- Owner: MartinNowak
- License: mit
- Created: 2015-03-22T01:54:54.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-07-17T20:26:37.000Z (over 2 years ago)
- Last Synced: 2025-03-15T00:05:58.572Z (about 1 year ago)
- Topics: d, static-server, vibe-d
- Language: D
- Size: 12.7 KB
- Stars: 13
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# serve [](http://code.dlang.org/packages/serve) 
A simple HTTP server for static files.
### Installation
You can simply use dub to run the tool.
```sh
dub fetch serve
dub run serve
dub run serve -- [ARGS]
```
Or you build the tool and copy/symlink it into your path.
```sh
dub fetch serve
dub build serve
sudo mv ~/.dub/packages/serve-1.0.0/serve /usr/local/bin/
```
### Usage
- serve the current working directory
```sh
serve
```
- serve an html file with it's containing folder and open it in your browser
```sh
serve path/to/index.html
```
- serve a folder
```sh
serve path/to/folder
```
- use a different port than 8080 (`-p|--port`)
```sh
serve -p 1234
```
- bind a different IP address than 127.0.0.1 using (`-b|--bind`)
```sh
serve -b 127.0.0.1
```
- run `-h|--help` to see all options
```sh
serve -h
```