heroku deployment fix & release

This commit is contained in:
Víctor Martínez 2021-03-21 21:55:47 +01:00
parent f960495005
commit 42d4cc3719
2 changed files with 4 additions and 8 deletions

View file

@ -1,5 +1,7 @@
build:
docker:
web: Dockerfile
web:
dockerfile: Dockerfile
target: production
run:
web: ./actix-messaging

View file

@ -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()