User Model and User Registration
Learn to create a user model and user registration flow in a Beego application.
In this lesson, we will create a new model User
using a migration. Then, we will implement the /signup
route using the HTTP POST method that registers a new user. While implementing this route, we will understand how password hashing is used.
Creating a user model
Creating a new model involves the following steps:
Creating a migration
Running the migration
Creating and registering the model
Creating a migration file
We create a new migration with the following command:
Get hands-on with 1200+ tech skills courses.