You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
419 B
16 lines
419 B
extern crate actix_web;
|
|
|
|
use actix_web::middleware::Logger;
|
|
use actix_web::{http, App};
|
|
|
|
use server;
|
|
|
|
pub fn create() -> App {
|
|
actix_web::App::new()
|
|
.middleware(Logger::default())
|
|
.scope("api/", |api_scope| server::api::route(api_scope))
|
|
.resource("/health", |r| {
|
|
r.method(http::Method::GET).with(server::healthcheck)
|
|
})
|
|
.resource("/", |r| r.f(server::index))
|
|
}
|