added config + plan

This commit is contained in:
Colin McKechney
2023-04-30 17:33:47 -04:00
parent 5117a3318f
commit f009dd7166
6 changed files with 70 additions and 9 deletions

View File

@@ -6,6 +6,7 @@ use actix_identity::IdentityMiddleware;
use actix_session::{SessionMiddleware, storage::CookieSessionStore};
mod api;
mod config;
static PORT: u16 = 8000;
const ALLOWED_ORIGIN: &str = "http://localhost:8009";
@@ -54,6 +55,10 @@ async fn main() -> std::io::Result<()> {
web::resource("/eatery/{eatery_id}")
.route(web::get().to(api::eatery::menu))
)
.service(
web::resource("/goal")
.route(web::post().to(api::plan::plan))
)
.route("/", web::get().to(api_index))
)
.route("/", web::get().to(index))