Skip to content

moaz-mokhtar/rust_training

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Training

This is the code to training materials.

Technologies are as below:

  • Rust programming language #rust_lang
  • Actix web framework
  • Postgres for database
  • Diesel ORM
  • REST API

Development steps

Run application

After downloading this repo:

  • install database

    diesel setup
    
  • run application

    cargo run
    

REST API queries using Postman

Total APIs to be developed as below:

  • register
  • login
  • user
  • refresh
  • logout
  • forgot
  • reset
  • two-factor
  • google-auth

register endpoint

  • Request:

    GET http://127.0.0.1:8000/register
    
        {
            "first_name": "...",
            "last_name": "...",
            "email": "...",
            "password": "...",
            "confirm_password": "..."
        }
  • Response:

    TODO
    

login endpoint

  • Request:

    GET http://127.0.0.1:8000/login
    
        {
            "email": "...",
            "password": "..."
        }
  • Response:

        {
            "message": "User authenticated",
            "data": true
        }


References

Below are little resources:
https://serde.rs/derive.html
https://stackoverflow.com/questions/62269278/how-can-i-make-protected-routes-in-actix-web
https://actix.rs/docs/middleware/
https://actix.rs/



Thanks

Developed by Moaz bin Mohamed Mokhtar

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published