server_lib

Crates.ioserver_lib
lib.rsserver_lib
version0.1.0
sourcesrc
created_at2021-09-18 13:36:48.515283
updated_at2021-09-18 13:36:48.515283
descriptionNaive library for multithreading backend system
homepage
repository
max_upload_size
id453302
size23,185
Vladyslav Kyrychenko (Alksgest)

documentation

README

Bycicle

Introduction

"Backend framework" for creating controller-based backend.

Implemented features

  • mongo driver wrapper
  • thread-pool based multithreading request handling
  • support of get, post, put, update, delete method of rest on controllers

Not implemented features

  • middleware processing
  • a lot of other
  • properly working request parsing

Usage

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();
}
Commit count: 0

cargo fmt