- Notifications
You must be signed in to change notification settings - Fork0
helloworld0606/interviewPython
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
- Windows 10
- Python 3.12.4
- Node.js v20.11.1
- npm v10.5.0
Clone the repository
git clone https://github.com/helloworld0606/interviewPython.git
Set up the backend server (cmd)
cd C:\interviewPython\backendpython -m venv venv.\venv\Scripts\activatepip install -r requirements.txt
Install Rust (if not already installed) Rust is needed to compile
bcryptcurl --proto'=https' --tlsv1.2 -sSf https://sh.rustup.rs| sh
Run the backend server
python app.py
Run the frontend server (terminal)
cd C:\interviewPython\frontend npm install npm audit# find security vulnerabilities npm audit fix# fix any security vulnerabilities npm run serve
The app will run athttp://localhost:8080/
"make sure backend is running"
Get account
curl -X GET http://localhost:3000/users
Add account
curl -X POST "http://localhost:3000/users" -H "Content-Type: application/json" -d "{\"id\": 2, \"name\": \"James\", \"account\": \"james123@gmail.com\", \"password\": \"DEF789\"}"Login account
curl -X POST "http://localhost:3000/users/login" -H "Content-Type: application/json" -d "{\"account\":\"alice123@gmail.com\",\"password\":\"ABC123456\"}"Two Factor Auth
- When login is successful, a QR code window will pop up.
- Scan the QR code using the Authenticator app on your iPhone.
- Replace XXXXXX (6 digits) with the one-time code from MyApp.
curl -X POST "http://localhost:3000/2fa/verify-otp" -H "Content-Type: application/json" -d "{\"userId\":1,\"otp\”:\”XXXXXX\”}”Account: alice123@gmail.comPassword: ABC123456- The login info will be saved in session storage
- To try a new login, open the inspect window —> go to Application —> SessionStorage —> clear all login records —> refresh the website
About
No description, website, or topics provided.
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.