wip: added get post comments, working insert comment to post
This commit is contained in:
@ -55,7 +55,7 @@ async fn main() {
|
||||
)
|
||||
.init();
|
||||
|
||||
if std::env::var("RUST_ENV").expect("development") != "development" {
|
||||
if std::env::var("RUST_ENV").unwrap_or_else(|_| "development".to_string()) != "development" {
|
||||
println!("we're not in development, starting up the rate limiter");
|
||||
let governor_conf = Arc::new(
|
||||
GovernorConfigBuilder::default()
|
||||
@ -97,11 +97,11 @@ async fn main() {
|
||||
TraceLayer::new_for_http()
|
||||
.make_span_with(trace::DefaultMakeSpan::new().level(tracing::Level::INFO))
|
||||
.on_response(trace::DefaultOnResponse::new().level(tracing::Level::INFO)),
|
||||
)
|
||||
.nest(
|
||||
"/comments",
|
||||
routes::comments::CommentsRoute::routes(&app_state),
|
||||
);
|
||||
// .nest(
|
||||
// "/comments",
|
||||
// routes::comments::CommentsRoute::routes(&app_state),
|
||||
// );
|
||||
|
||||
// run it with hyper
|
||||
let listener = TcpListener::bind("0.0.0.0:3000").await.unwrap();
|
||||
|
Reference in New Issue
Block a user