feat: add serving uni projects

This commit is contained in:
jabuxas 2025-02-16 09:13:32 -03:00
parent 71213f26ef
commit ad89fb7fc0

View File

@ -3,7 +3,7 @@ extern crate rocket;
use std::{borrow::Cow, ffi::OsStr, path::PathBuf};
use rocket::{http::ContentType, response::content::RawHtml};
use rocket::{fs::FileServer, http::ContentType, response::content::RawHtml};
use rust_embed::Embed;
#[derive(Embed)]
@ -31,5 +31,7 @@ fn dist(file: PathBuf) -> Option<(ContentType, Cow<'static, [u8]>)> {
#[launch]
fn rocket() -> _ {
rocket::build().mount("/", routes![index, dist])
rocket::build()
.mount("/", routes![index, dist])
.mount("/projects", FileServer::from("./projects"))
}