rl_lang/docs/entries/stdlib/http/
http_server_start.rs1use crate::docs::entry::FnEntry;
2
3pub static HTTP_SERVER_START: FnEntry = FnEntry {
4 signature: "http_server_start(addr)",
5 description: "starts an HTTP server bound to \"host:port\" and returns a server handle",
6 example: r#"
7get std::http::http_server_start
8
9dec int server = result_unwrap(http_server_start("0.0.0.0:8080"))"#,
10 expected_output: None,
11 returns: "Result[int]",
12 errors: Some("Err(string) if the address can't be bound"),
13 see_also: &["http_server_recv", "http_server_stop"],
14 since: Some("v0.1.5"),
15};