Simple Phone Authorization using GoLang and JavaScript
- Home Screen
- Choose county for the phone mask
- Enter phone number. It's automaticly formatted with to the phone mask
- Existing Phone Number (the name is taken from API, in the example it is Nikita)
- Invalid Phone Number (the error is also taken from API)
- Clone or download this GitHub repository
git clone url- Navigate to the project folder
cd GoJsPhoneAuth- Navigate to the backend directory
cd backend- Build GoLang Project (it is simple using Makefile)
make build- Run the builded project file apiserver in backend directory
- Navigate to the frontend directory
cd frontend- Open the file index.html in your browser
- To create a new user (POST method)
http://0.0.0.0:8000/userParams: {
"name": "Example",
"phone": "+123456789",
}
- To get the user by phone number (GET method)
http://0.0.0.0:8000/user/{phone}- To delete user by phone number (DELETE method)
http://0.0.0.0:8000/user/{phone}




