Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/livioribeiro/rust-tiny-http
Small http server written in rust
https://github.com/livioribeiro/rust-tiny-http
Last synced: 12 days ago
JSON representation
Small http server written in rust
- Host: GitHub
- URL: https://github.com/livioribeiro/rust-tiny-http
- Owner: livioribeiro
- License: mit
- Created: 2015-07-14T03:12:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-07T13:07:15.000Z (over 9 years ago)
- Last Synced: 2023-04-09T05:36:34.115Z (over 1 year ago)
- Language: Rust
- Size: 219 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tiny-http-server
[![Build Status](https://travis-ci.org/livioribeiro/rust-tiny-http.svg?branch=master)](https://travis-ci.org/livioribeiro/rust-tiny-http)Small http server written in rust
This is an experiment I started to learn the Rust language.
I decided to make an Http server because it is a good challenge and I had a lot of fun building it.
To start the server, just clone this repo and run `$ cargo run` and the it will start listening at port 9000. To change the address the server will listen and enable directory listing, run `$ cargo run -- -a 127.0.0.1:80 -d` (or `$ cargo run -- --addr=127.0.0.1:80 --dir`)
Currently, you can only change the server root by editing `main.rs`.
```rust
fn main() {
// ...// Edit here to change the server root
let path = env::home_dir().unwrap();// ...
}
```