Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaguar-dart/serve
Serves static files in a directory
https://github.com/jaguar-dart/serve
authentication basic-authentication cli https logging serve-files simplehttpserver static-server static-website stats throttle
Last synced: 3 months ago
JSON representation
Serves static files in a directory
- Host: GitHub
- URL: https://github.com/jaguar-dart/serve
- Owner: Jaguar-dart
- License: bsd-3-clause
- Created: 2018-01-15T18:23:57.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-24T07:06:41.000Z (over 3 years ago)
- Last Synced: 2023-08-20T23:04:39.955Z (over 1 year ago)
- Topics: authentication, basic-authentication, cli, https, logging, serve-files, simplehttpserver, static-server, static-website, stats, throttle
- Language: Dart
- Size: 10.7 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# serve
CLI to serves static files in a directory. Simpler to Python's `python -m SimpleHTTPServer`.
# Installing
```bash
pub global activate serve
```# Serve files in current directory
```bash
serve
```This command by default serves content of current directory on port `8080` and host `0.0.0.0`.
# Configure host and port
Use `--host` (abbreviation `-H`) and `--port` (abbreviation `-p`) to serve on a desired host and port.
```bash
serve -h localhost -p 8081
```# Serve content of specific directory
Use `--dir` (abbreviated as `-d`) to serve contents of a desired directory.
```bash
serve -d /home/myname/mysite
```# Serve at a given base path
Use `--base-path` (abbreviated as `-b`) to serve contents with desired base path.
```bash
serve -b /myblog
```# More features to come!
+ [ ] Support CORS
+ [ ] Support reverse proxy