-
Notifications
You must be signed in to change notification settings - Fork 1
Implement the REST api #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: refactor
Are you sure you want to change the base?
Conversation
4adex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add exhaustive tests for the server, and move the api_server to a new directory named clients at the hierarchy of crates. All clients will go in that directory
| .await | ||
| .unwrap(); | ||
| axum::serve(listener, app.into_make_service()) | ||
| .await |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let listener = TcpListener::bind(config.listen_addr)
.await
.map_err(|e| ..)?;
axum::serve(listener, app.into_make_service())
.await
.map_err(|e| ..)?;Here map the errors and pass them gracefully instead of using unwraps,
define new error types if you want. Also this might be independent of core crates so you need to define different error type.
|
Else looks good |
bc8820d to
a4c445b
Compare
No description provided.