// Set up websocket server
let server = ChatServer::startup(pool.clone()).start();
- // TODO: its probably failing because the other instance is not up yet
- // need to make a new thread and wait a bit before fetching
thread::spawn(move || {
// some work here
sleep(Duration::from_secs(5));
// Create Http server with websocket support
Ok(
HttpServer::new(move || {
+ let settings = Settings::get();
App::new()
.wrap(middleware::Logger::default())
.data(pool.clone())