1 unstable release

0.1.0 Sep 18, 2021

#93 in #thread-pool

MIT/Apache

23KB
586 lines

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();
}

Dependencies

~26–38MB
~760K SLoC