aboutsummaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/server.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bin/server.rs b/src/bin/server.rs
index d074e4f..c28d041 100644
--- a/src/bin/server.rs
+++ b/src/bin/server.rs
@@ -5,7 +5,7 @@ use actix_web::{web, App, HttpServer};
5use diesel::r2d2::{ConnectionManager, Pool}; 5use diesel::r2d2::{ConnectionManager, Pool};
6use diesel::MysqlConnection; 6use diesel::MysqlConnection;
7use furby::handlers::smoke::manual_hello; 7use furby::handlers::smoke::manual_hello;
8use furby::handlers::users; 8use furby::handlers::{product, users};
9use rand::Rng; 9use rand::Rng;
10 10
11#[actix_web::main] 11#[actix_web::main]
@@ -40,6 +40,10 @@ async fn main() -> std::io::Result<()> {
40 web::post().to(users::change_password), 40 web::post().to(users::change_password),
41 ), 41 ),
42 ) 42 )
43 .service(
44 web::scope("/product")
45 .route("/new", web::post().to(product::new_product)),
46 )
43 .route("/hey", web::get().to(manual_hello)) 47 .route("/hey", web::get().to(manual_hello))
44 }) 48 })
45 .bind("127.0.0.1:7878")? 49 .bind("127.0.0.1:7878")?