mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2025-09-05 17:00:39 +00:00
fallback route & dep updates
This commit is contained in:
2
backend/Cargo.lock
generated
2
backend/Cargo.lock
generated
@@ -398,7 +398,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cryptgeon"
|
||||
version = "1.4.0"
|
||||
version = "1.4.1"
|
||||
dependencies = [
|
||||
"actix-files",
|
||||
"actix-web",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cryptgeon"
|
||||
version = "1.4.0"
|
||||
version = "1.4.1"
|
||||
authors = ["cupcakearmy <hi@nicco.io>"]
|
||||
edition = "2021"
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
use actix_files::Files;
|
||||
use actix_web::web;
|
||||
use actix_files::{Files, NamedFile};
|
||||
use actix_web::{web, Result};
|
||||
|
||||
pub fn init(cfg: &mut web::ServiceConfig) {
|
||||
cfg.service(
|
||||
@@ -8,3 +8,7 @@ pub fn init(cfg: &mut web::ServiceConfig) {
|
||||
.use_etag(true),
|
||||
);
|
||||
}
|
||||
|
||||
pub async fn index() -> Result<NamedFile> {
|
||||
Ok(NamedFile::open("./frontend/build/index.html")?)
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
use actix_web::{middleware, App, HttpServer};
|
||||
use actix_web::{middleware, web, App, HttpServer};
|
||||
use dotenv::dotenv;
|
||||
|
||||
#[macro_use]
|
||||
@@ -22,6 +22,7 @@ async fn main() -> std::io::Result<()> {
|
||||
.configure(size::init)
|
||||
.configure(api::init)
|
||||
.configure(client::init)
|
||||
.default_service(web::to(client::index))
|
||||
})
|
||||
.bind("0.0.0.0:5000")?
|
||||
.run()
|
||||
|
Reference in New Issue
Block a user