Write websocket server.
This commit is contained in:
@@ -2,16 +2,22 @@
|
||||
#[macro_use] extern crate rocket;
|
||||
#[macro_use] extern crate rocket_contrib;
|
||||
|
||||
pub mod websocket;
|
||||
pub mod database;
|
||||
pub mod guards;
|
||||
pub mod routes;
|
||||
pub mod email;
|
||||
|
||||
use dotenv;
|
||||
use std::thread;
|
||||
|
||||
fn main() {
|
||||
dotenv::dotenv().ok();
|
||||
database::connect();
|
||||
|
||||
thread::spawn(|| {
|
||||
websocket::launch_server();
|
||||
});
|
||||
|
||||
routes::mount(rocket::ignite()).launch();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user