How to Build an API Server with Rust and MongoDB

Поделиться
HTML-код
  • Опубликовано: 3 июл 2024
  • A step-by-step tutorial for building a scalable Rust HTTP server using Actix and MongoDB.
    ⏰ Timestamps
    00:00 - Intro
    00:47 - Creating the project
    01:14 - Installing dependencies
    01:46 - Setting up main.rs
    04:10 - Running the project
    04:51 - Building the models
    16:27 - Building the database service
    33:14 - Building the routes
    40:57 - Testing the routes in Postman
    43:11 - Outro
    📜 Description
    In this tutorial, you'll learn how to build a simple HTTP web server in Rust, with the following endpoints:
    ‭• POST /owner - for adding an owner.
    ‭• POST /dog - for adding a dog to the given owner.
    ‭• POST /booking - for adding a booking for the given owner.
    ‭• GET /bookings - to get all the future bookings, from closest in time to furthest away.
    ‭• PUT /booking/{id}/cancel - to cancel a particular booking that’s fallen through.
    #rust #actix #mongodb #api #server
    💻 Code
    To see the final project, go to: github.com/BretCameron/rust-w....
    📝 Article
    For a written version of this tutorial, check out my article on Medium: / how-to-build-an-api-se...
    🔗 Links
    ‭• Rust: www.rust-lang.org/tools/install
    ‭• Actix Web: actix.rs/docs/
    ‭• MongoDB: mongodb.com/docs/manual/tutor...
  • НаукаНаука

Комментарии • 6

  • @pooryabarkati2388
    @pooryabarkati2388 13 дней назад

    great video 👍,
    learned a lot

  • @hiteshyadavm2136
    @hiteshyadavm2136 День назад

    my bookings get isn't working ,console says thread 'actix-rt|system:0|arbiter:1' panicked at expect(err_msg) in get bookings function

  • @slimbron9489
    @slimbron9489 Месяц назад +1

    Are you planning to create any tutorials for JWT authentication and Mongodb in Rust?

  • @valentineejakpomewhe4352
    @valentineejakpomewhe4352 Месяц назад +1

    hi, how can i save jwts on tauri, new to tauri

  • @rohansen6872
    @rohansen6872 Месяц назад

    very helpful! please make a video on postgres with rust!

  • @slimbron9489
    @slimbron9489 Месяц назад

    Excellent tutorial, thanks for sharing! 👍🏼