Skip to content

aaryac33/LFX-Mentorship_login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Step 1: Set up your Rust environment

Step 2: Create a new Rust project: Use Cargo to initialize a new Rust project. Open a terminal and run the following command: 'cargo new rust_login_function --bin' This will create a new Rust project named "rust_login_function" with a binary target.

Step 3: Add dependencies: Open the Cargo.toml file in your project folder and add the actix-web dependency: [dependencies] actix-web = "3.3.2"

Write the login function: In the src/main.rs file, you can define your login function using actix-web: 'python file for which is added'

Build and run the server: Run the following command to build and start the server: 'cargo run'

.gitignore: A file that specifies which files or directories should be ignored by version control (Git).

The server should now be running on http://127.0.0.1:8080, ready to accept HTTP POST requests to the /login endpoint.(ip address subject to change)

Now, your Rust server is up and running, and you can send POST requests to http://127.0.0.1:8080/login with JSON data containing username and password fields. The server will respond with the login status in JSON format.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages