syncstream-dev / syncstream-backend

Java + SpringBoot backend for SyncStream Application
GNU General Public License v2.0
2 stars 2 forks source link

back-end main function #9

Closed Xu-Gavin closed 9 months ago

Xu-Gavin commented 9 months ago

Sample of something we would see in the main function

fn main() {
    // Create an instance of your web server
    let server = HttpServer::new(|| {
        // Create an App instance and define your routes
        App::new()
            .route("/", web::get().to(index))
            .route("/api/resource", web::get().to(get_resource))
            .route("/api/resource", web::post().to(create_resource))
            // Add more routes as needed...
    });

    // Start the server
    server.run().unwrap();
}
Xu-Gavin commented 9 months ago

According to research on Sprintboot, there doesn't seem to be much more required in main function. We can close this issue for now.