mirror of
https://codeberg.org/JasterV/chat-rooms-actix.git
synced 2026-04-26 18:10:04 +00:00
mini refactor on main.rs
This commit is contained in:
parent
099a1584a5
commit
a101d07b06
1 changed files with 1 additions and 1 deletions
|
|
@ -7,10 +7,10 @@ mod server;
|
|||
use crate::{actors::chat_server::ChatServer, models::AppState, server::init};
|
||||
use actix::Actor;
|
||||
use actix_web::{App, HttpServer};
|
||||
|
||||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
let chat = ChatServer::new().start();
|
||||
|
||||
HttpServer::new(move || {
|
||||
App::new()
|
||||
.data(AppState { chat: chat.clone() })
|
||||
|
|
|
|||
Loading…
Reference in a new issue