All Projects → arjsin → Http_static

arjsin / Http_static

Licence: other
File serving using tower web

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Http static

Suave
Suave is a simple web development F# library providing a lightweight web server and a set of combinators to manipulate route flow and task composition.
Stars: ✭ 1,196 (+6544.44%)
Mutual labels:  async, http-server
Meinheld
Meinheld is a high performance asynchronous WSGI Web Server (based on picoev)
Stars: ✭ 1,339 (+7338.89%)
Mutual labels:  async, http-server
Http Server
A non-blocking HTTP application server for PHP based on Amp.
Stars: ✭ 1,122 (+6133.33%)
Mutual labels:  async, http-server
Chili
Chili: HTTP Served Hot
Stars: ✭ 7 (-61.11%)
Mutual labels:  async, http-server
Falcon
A high-performance web server for Ruby, supporting HTTP/1, HTTP/2 and TLS.
Stars: ✭ 2,058 (+11333.33%)
Mutual labels:  async, http-server
Aiohttp
Asynchronous HTTP client/server framework for asyncio and Python
Stars: ✭ 11,972 (+66411.11%)
Mutual labels:  async, http-server
Igropyr
a async http server base on libuv for Chez Scheme
Stars: ✭ 85 (+372.22%)
Mutual labels:  async, http-server
Swoole Bundle
Symfony Swoole Bundle
Stars: ✭ 201 (+1016.67%)
Mutual labels:  async, http-server
Netcoreserver
Ultra fast and low latency asynchronous socket server & client C# .NET Core library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
Stars: ✭ 799 (+4338.89%)
Mutual labels:  async, http-server
Nasus
Zero-configuration command-line async HTTP files server in Clojure. Like Python's SimpleHTTPServer but scalable.
Stars: ✭ 158 (+777.78%)
Mutual labels:  async, http-server
Http Kit
http-kit is a minimalist, event-driven, high-performance Clojure HTTP server/client library with WebSocket and asynchronous support
Stars: ✭ 2,234 (+12311.11%)
Mutual labels:  async, http-server
Cppserver
Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
Stars: ✭ 528 (+2833.33%)
Mutual labels:  async, http-server
Klein
werkzeug + twisted.web
Stars: ✭ 770 (+4177.78%)
Mutual labels:  async
Ws Promise Client
PROJECT MOVED: https://github.com/kdex/ws-promise
Stars: ✭ 6 (-66.67%)
Mutual labels:  async
Recoil
Asynchronous coroutines for PHP 7.
Stars: ✭ 765 (+4150%)
Mutual labels:  async
Wx Promise Pro
✨强大、优雅的微信小程序异步库🚀
Stars: ✭ 762 (+4133.33%)
Mutual labels:  async
Go Book Store Api
Go Sample project to understand Mysql CRUD operation with best practises Includes logging, JWT, Swagger and Transactions
Stars: ✭ 18 (+0%)
Mutual labels:  http-server
Httpserver
Python 3 implementation of an HTTP server
Stars: ✭ 5 (-72.22%)
Mutual labels:  http-server
Cpprestsdk
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Stars: ✭ 6,631 (+36738.89%)
Mutual labels:  async
Mycat2
MySQL Proxy using Java NIO based on Sharding SQL,Calcite ,simple and fast
Stars: ✭ 750 (+4066.67%)
Mutual labels:  async

http_static

Simple static file command line HTTP server written in Rust language using tower-web. This supports custom Index file and 404 Not Found handler both default to index.html. It can be useful for serving static websites. It also provides an in memory file serving mode which can be useful when there is only a small amount data which the server needs to serve. In memory file serving is much faster and does not read files once the server is initialized which does all the reading. This mode can be useful for serving web apps.

The project is work in progress.

Compile

These instructions assume rust and cargo to be installed. If you don't have them, please install using rustup.

To getting the repository

git clone https://github.com/arjsin/http_static.git
cd http_static
# Future instructions assume this directory

To build

Release build provides good performance while running the program.

cargo build --release

To run

Run to listen on default port

cargo run --release

Run to listen on default port with in memory files

cargo run --release -- -m

The help prints all the possible options

cargo run --release -- -h
http_static
A lightweight static file server for HTTP

USAGE:
    http_static [FLAGS] [OPTIONS]

FLAGS:
    -h, --help         Prints help information
    -m, --in_memory    Sets in memory file server
    -V, --version      Prints version information

OPTIONS:
    -d, --default <PATH>         Sets path of a file which is served when the file requested in not available, default: index.html
    -i, --index <FILENAME>       Sets file name inside each directory to be served at path of directory, default: index.html
    -l, --listen <ADDRESS>       Sets the address to listen on, default: [::1]:8080
    -r, --root <PATH>            Sets path of a directory for serving files, default: .
        --tls_cert <FILENAME>    Sets file name for TLS certificate, must be present with TLS private key
        --tls_key <FILENAME>     Sets file name for TLS private key, must be present with TLS certificate

TODO

  • [x] File serving
  • [x] In memory file serving
  • [ ] Logging
  • [ ] In memory serving, 304 Not Modified support
  • [ ] In memory serving, file change notification support
  • [x] HTTPS support
  • [ ] Directory listing
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].