https://github.com/alexendoo/serve
HTTP development server for files spanning multiple directories
https://github.com/alexendoo/serve
cli development http server
Last synced: 4 months ago
JSON representation
HTTP development server for files spanning multiple directories
- Host: GitHub
- URL: https://github.com/alexendoo/serve
- Owner: Alexendoo
- License: mit
- Created: 2016-08-05T21:54:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-20T18:07:42.000Z (almost 8 years ago)
- Last Synced: 2025-02-27T12:38:29.464Z (9 months ago)
- Topics: cli, development, http, server
- Language: Go
- Homepage: https://git.io/serve
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
HTTP server for development - serve several specified directories
simulataniously
## Install
```
go get github.com/Alexendoo/Serve
```
[Or download a binary](https://github.com/Alexendoo/serve/releases)
## Usage
```
USAGE:
serve [OPTION]... [DIR]...
OPTIONS:
--host -- bind to host (default: localhost)
-i, --index -- serve all paths to index if file not found
--no-list -- disable directory listings
-p, --port -- bind to port (default: 8080)
-v, --verbose -- display requests and responses
```
## Examples
Serve files from the current directory
```
serve
```
----
Utilise npm packages without having to type `../node_modules`
```
serve client node_modules
```
```ANTLR
client/
index.html
node_modules/
whatwg-fetch/
fetch.js
```
```html
```
---
Use a specified file for any non matching requests, for instance for HTML5 routing
```
serve -i index.html
```