$ yarn install
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
# create migration
yarn db:create src/migrations/<migration_name>
# run migration
yarn db:migrate
# drop data base
yarn db:drop
# seed data base
yarn db:seeds
- register
POST /auth/register
#body
{
"email":
"password":
}
#response, status 201:
{
"id":
"email":
}
- login
POST /auth/login
#body
{
"email":
"password":
}
#response, status 201:
{
access_token:
}
#access token should be used as a Bearer authorization.
- forgot password
POST /auth/forgot-password
#body
{
"email":
}
#response, status 201:
{
"message": "Password reset email sent successfully"
}
- reset password
POST /auth/reset-password
#body
{
"resetToken":
"newPassword":
}
#response, status 201:
{
message: 'Password reset successfully'
}