Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexendoo/serve
HTTP development server for files spanning multiple directories
https://github.com/alexendoo/serve
cli development http server
Last synced: 10 days 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 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-20T18:07:42.000Z (about 7 years ago)
- Last Synced: 2024-11-11T19:20:52.669Z (2 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
```