server_lib 0.1.0

Naive library for multithreading backend system
Documentation
  • Coverage
  • 1.22%
    1 out of 82 items documented0 out of 58 items with examples
  • Size
  • Source code size: 92.4 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.62 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 19s Average build duration of successful builds.
  • all releases: 1m 19s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Alksgest

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