1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 00:21:08 +01:00
actix-web/README.md
Daniel Holbert 8219a7aebe
Use https (not http) url for meritbadge
Right now this readme file uses an HTTP url to reference a meritbadge image, which ends up producing "broken https" UI on the crates.io page https://crates.io/crates/actix-web. This patch just upgrades this to an HTTPS url (which still works), to avoid that problem. (Literally a 1-character change, changing "http" to "https" in "http://meritbadge.herokuapp.com/actix-web")
2018-04-02 10:44:46 -07:00

4.3 KiB

Actix web Build Status Build status codecov crates.io Join the chat at https://gitter.im/actix/actix

Actix web is a simple, pragmatic, extremely fast, web framework for Rust.

Documentation

Example

extern crate actix_web;
use actix_web::{App, HttpServer, Path};

fn index(info: Path<(String, u32)>) -> String {
    format!("Hello {}! id:{}", info.0, info.1)
}

fn main() {
    HttpServer::new(
        || App::new()
            .resource("/{name}/{id}/index.html", |r| r.with(index)))
        .bind("127.0.0.1:8080").unwrap()
        .run();
}

More examples

You may consider checking out this directory for more examples.

Benchmarks

License

This project is licensed under either of

at your option.

Code of Conduct

Contribution to the actix-web crate is organized under the terms of the Contributor Covenant, the maintainer of actix-web, @fafhrd91, promises to intervene to uphold that code of conduct.