Re-write notifications system.

This commit is contained in:
Paul Makles
2020-04-13 16:04:41 +01:00
parent 4fbd6c816d
commit 577f25642e
10 changed files with 506 additions and 211 deletions

View File

@@ -9,9 +9,9 @@ extern crate bitfield;
pub mod database;
pub mod email;
pub mod guards;
pub mod notifications;
pub mod routes;
pub mod util;
pub mod websocket;
use dotenv;
use rocket_cors::AllowedOrigins;
@@ -22,7 +22,11 @@ fn main() {
database::connect();
thread::spawn(|| {
websocket::launch_server();
notifications::pubsub::launch_subscriber();
});
thread::spawn(|| {
notifications::ws::launch_server();
});
let cors = rocket_cors::CorsOptions {