MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / start

Function start

examples/rocket_example/api/src/lib.rs:143–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141
142#[tokio::main]
143async fn start() -> Result<(), rocket::Error> {
144 rocket::build()
145 .attach(Db::init())
146 .attach(AdHoc::try_on_ignite("Migrations", run_migrations))
147 .mount("/", FileServer::from(relative!("/static")))
148 .mount(
149 "/",
150 routes![new, create, delete, destroy, list, edit, update],
151 )
152 .register("/", catchers![not_found])
153 .attach(Template::fairing())
154 .launch()
155 .await
156 .map(|_| ())
157}
158
159pub fn main() {
160 let result = start();

Callers 1

mainFunction · 0.70

Calls 1

initFunction · 0.85

Tested by

no test coverage detected