1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
/*!
The server crate provides a server with the gateway worker (via miniflare)
and a bridge server connecting the worker to an sqlite db
# Example
```ignore
const PORT: u16 = 4000;
# common::environment::Environment::try_init().unwrap();
// `common::environment::Environment` must be initialized before this
let server_handle = server::start(PORT).unwrap();
```
*/
// TODO: make the prior example testable
#![forbid(unsafe_code)]
#[macro_use]
extern crate log;
mod bridge;
mod consts;
mod event;
mod file_watcher;
mod servers;
pub mod errors;
pub mod types;
pub use servers::start;