mirror of
https://codeberg.org/JasterV/chat-rooms-actix.git
synced 2026-04-26 18:10:04 +00:00
heroku deployment fix & release
This commit is contained in:
parent
f960495005
commit
42d4cc3719
2 changed files with 4 additions and 8 deletions
|
|
@ -1,5 +1,7 @@
|
|||
build:
|
||||
docker:
|
||||
web: Dockerfile
|
||||
web:
|
||||
dockerfile: Dockerfile
|
||||
target: production
|
||||
run:
|
||||
web: ./actix-messaging
|
||||
|
|
@ -6,14 +6,9 @@ mod routes;
|
|||
|
||||
use crate::{actors::chat_server::ChatServer, models::AppState};
|
||||
use actix::Actor;
|
||||
use actix_web::{App, HttpServer, get};
|
||||
use actix_web::{App, HttpServer};
|
||||
use routes::connect;
|
||||
|
||||
#[get("/hi")]
|
||||
async fn hi() -> &'static str {
|
||||
"Hello, World!"
|
||||
}
|
||||
|
||||
fn get_server_addr() -> String {
|
||||
let port = std::env::var("PORT").expect("PORT env variable not found");
|
||||
format!("0.0.0.0:{}", port)
|
||||
|
|
@ -27,7 +22,6 @@ async fn main() -> std::io::Result<()> {
|
|||
App::new()
|
||||
.data(AppState { chat: chat.clone() })
|
||||
.service(connect)
|
||||
.service(hi)
|
||||
})
|
||||
.bind(&addr)?
|
||||
.run()
|
||||
|
|
|
|||
Loading…
Reference in a new issue