bundle frontend too
This commit is contained in:
parent
850d977e8e
commit
660da70666
6 changed files with 162 additions and 9 deletions
|
@ -1,4 +1,5 @@
|
|||
use actix_cors::Cors;
|
||||
use actix_files as fs;
|
||||
use actix_web::{web, App, HttpServer};
|
||||
use anyhow::Result;
|
||||
use simplelink::{handlers, AppState};
|
||||
|
@ -61,6 +62,7 @@ async fn main() -> Result<()> {
|
|||
.route("/health", web::get().to(handlers::health_check)),
|
||||
)
|
||||
.service(web::resource("/{short_code}").route(web::get().to(handlers::redirect_to_url)))
|
||||
.service(fs::Files::new("/", "./static").index_file("index.html"))
|
||||
})
|
||||
.workers(2)
|
||||
.backlog(10_000)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue