commit
This commit is contained in:
parent
a57dd55785
commit
74680b91b5
@ -2,5 +2,5 @@ mod service;
|
||||
mod server;
|
||||
|
||||
pub fn boot() {
|
||||
start_server();
|
||||
server::start_server();
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
mod server;
|
||||
|
||||
pub fn start_server() {
|
||||
server::start_server()
|
||||
server::start_server();
|
||||
}
|
@ -6,6 +6,10 @@ async fn greet(name: web::Path<String>) -> impl Responder {
|
||||
}
|
||||
|
||||
|
||||
pub fn test_start_server() {
|
||||
println!("test start account server")
|
||||
}
|
||||
|
||||
pub fn start_server() -> std::io::Result<()> {
|
||||
HttpServer::new(|| {
|
||||
App::new().service(greet)
|
||||
|
2
src/apps/mod.rs
Normal file
2
src/apps/mod.rs
Normal file
@ -0,0 +1,2 @@
|
||||
pub mod account;
|
||||
pub mod order;
|
@ -1,5 +1,6 @@
|
||||
use crate::apps::account as account;
|
||||
|
||||
|
||||
fn start_apps() {
|
||||
account::boot()
|
||||
}
|
1
src/bin/mod.rs
Normal file
1
src/bin/mod.rs
Normal file
@ -0,0 +1 @@
|
||||
pub mod all_in_one;
|
@ -1,2 +0,0 @@
|
||||
pub mod all_in_one;
|
||||
use apps::account;
|
@ -1,7 +1,9 @@
|
||||
use crate::account;
|
||||
use apps::account;
|
||||
|
||||
pub mod apps;
|
||||
pub mod bin;
|
||||
use crate::apps::account;
|
||||
|
||||
#[actix_web::main] // or #[tokio::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
println!("Hello, world!");
|
||||
bin::all_in_one::boot();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user