Building a REST API in Rust (Part 1)

in #utopian-io8 years ago (edited)

What Will I Learn?

  • You will learn how to use the Diesel ORM to build a schema
  • You will learn a way of connecting a Rust project to an SQL Database
  • You will learn how to properly build data models which implement code generation macros that create SQL

Requirements

  • A moderate understanding of the Rust programming language
  • A little knowledge of SQL and SQL databases
  • A fair understanding of command lines/terminals and command line interfaces
  • An understanding of environment variables

Difficulty

  • Intermediate

Description

In this video, we start building a REST API in the Rust Programming language. We use the Diesel library to build our database. We also explore different methods of creating and migrating our data models through the use of the Diesel CLI and the Diesel macro system. Finally, we use the Diesel library to help build out declarative functions that allow us to insert, update, delete and view the data from our database. These functions will eventually help us give this type of functionality to our API endpoint.

The source code for this project can be found here

Video Tutorial



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @ewq, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

Hey @tensor I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.04
TRX 0.33
JST 0.095
BTC 62095.48
ETH 1737.24
USDT 1.00
SBD 0.39