Crates.io | server_lib |
lib.rs | server_lib |
version | 0.1.0 |
source | src |
created_at | 2021-09-18 13:36:48.515283 |
updated_at | 2021-09-18 13:36:48.515283 |
description | Naive library for multithreading backend system |
homepage | |
repository | |
max_upload_size | |
id | 453302 |
size | 23,185 |
"Backend framework" for creating controller-based backend.
For now server
struct from lib can be use only in static context like this:
lazy_static! {
static ref SERVER: ApiServer = ApiServer::new(
ApiSettings::new("127.0.0.1", "4444", 2048),
vec![Box::new(UserController::new(
"mongodb://localhost:27017",
"mydb",
"users",
))]
);
}
fn main() {
SERVER.start();
}