1
0
mirror of https://github.com/actix/examples synced 2025-06-28 18:00:37 +02:00

migrate ci to github actions (#367)

This commit is contained in:
Rob Ede
2020-09-16 01:11:49 +01:00
committed by GitHub
parent e3c6a1ec07
commit d836b046c9
11 changed files with 6522 additions and 77 deletions

View File

@ -32,11 +32,11 @@ fn json_error_handler(err: error::JsonPayloadError, _req: &HttpRequest) -> error
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| {
App::new()
.service(greet)
.app_data(web::JsonConfig::default()
.error_handler(json_error_handler)
) // <- register error_handler for JSON extractors.
App::new().service(greet).app_data(
web::JsonConfig::default()
// register error_handler for JSON extractors.
.error_handler(json_error_handler),
)
})
.bind("127.0.0.1:8088")?
.run()