Skip to content

Commit

Permalink
add helper fn
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Dec 10, 2018
1 parent 8ad93f4 commit 9577b7b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Actix net - framework for composable network services (experimental)

```rust
fn main() {
let sys = actix::System::new("test");
let sys = actix_rt::System::new("test");

// load ssl keys
let mut builder = SslAcceptor::mozilla_intermediate(SslMethod::tls()).unwrap();
Expand All @@ -26,7 +26,7 @@ fn main() {
// bind socket address and start workers. By default server uses number of
// available logical cpu as threads count. actix net start separate
// instances of service pipeline in each worker.
Server::default()
actix_server::build()
.bind(
// configure service pipeline
"basic", "0.0.0.0:8443",
Expand Down
5 changes: 5 additions & 0 deletions actix-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ impl Token {
token
}
}

/// Start server building process
pub fn build() -> ServerBuilder {
ServerBuilder::default()
}

0 comments on commit 9577b7b

Please sign in to comment.