-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from Basicprogrammer10/dev
afire 2.2.0
- Loading branch information
Showing
34 changed files
with
1,633 additions
and
992 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
*target | ||
/testing | ||
/examples/target | ||
/benches | ||
/examples/target | ||
todo.md |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
authors = ["Connor Slade <[email protected]>"] | ||
edition = "2018" | ||
name = "afire" | ||
version = "2.1.0" | ||
version = "2.2.0" | ||
|
||
categories = ["network-programming", "web-programming::http-server"] | ||
description = "🔥 A blazing fast web framework for Rust" | ||
|
@@ -27,3 +27,6 @@ tracing = [] | |
|
||
[dev-dependencies] | ||
afire = { path = ".", features = ["extensions"] } | ||
|
||
[package.metadata.docs.rs] | ||
rustc-args = ["--cfg", "docsrs"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
use afire::{ | ||
prelude::*, | ||
trace::{set_log_level, Level}, | ||
}; | ||
|
||
macro_rules! empty_middleware { | ||
($($name:tt,)*) => { | ||
$( | ||
struct $name; | ||
impl Middleware for $name {} | ||
)* | ||
}; | ||
} | ||
|
||
empty_middleware! { | ||
Middleware1, | ||
Middleware2, | ||
Middleware3, | ||
Middleware4, | ||
Middleware5, | ||
} | ||
|
||
fn main() { | ||
set_log_level(Level::Debug); | ||
let mut server = Server::<()>::new([127, 0, 0, 1], 8080); | ||
server.route(Method::ANY, "**", |_req| Response::new()); | ||
|
||
Middleware1.attach(&mut server); | ||
Middleware2.attach(&mut server); | ||
Middleware3.attach(&mut server); | ||
Middleware4.attach(&mut server); | ||
Middleware5.attach(&mut server); | ||
|
||
server.start().unwrap(); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.