Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/remusao/simple-sanic
A faster http.server using sanic
https://github.com/remusao/simple-sanic
http-server python3 sanic
Last synced: 2 months ago
JSON representation
A faster http.server using sanic
- Host: GitHub
- URL: https://github.com/remusao/simple-sanic
- Owner: remusao
- License: mit
- Created: 2017-11-26T11:22:04.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-08-06T05:22:13.000Z (over 2 years ago)
- Last Synced: 2024-10-11T20:18:19.003Z (3 months ago)
- Topics: http-server, python3, sanic
- Language: Python
- Size: 11.7 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# simple-sanic
> `simple-sanic` is a drop-in replacement of `http.server`. It allows to serve the content of the current directory as static files. Except much faster! :rotating_light::boom:
With `http.server`:
```sh
$ python -m http.server
```With `simple-sanic`:
```sh
$ python -m simple-sanic
```So why bother? `Sanic` is orders of magnitude faster than `http.server`! For a
bit more details see: [A Faster http.server using Sanic](http://remusao.github.io/posts/faster-http-server-sanic.html).# Installation
`simple-sanic` requires python 3.5+ to work.
```sh
$ pip install simple-sanic
```Then simply run:
```sh
$ python -m simple-sanic
```You can also customize the `host` and `port`:
```sh
$ python -m simple-sanic --help
Usage:
simple-sanic [options]
simple-sanic -h | --helpOptions:
-p --port PORT Specify alternate port [default: 8000]
-b --bind ADDRESS Specify alternate bind address [default: 0.0.0.0]
-h, --help Show this help message and exit.
```