learn hapi — Generate a Username in Mongoose Middleware

You added a profile editing screen in the previous tutorial. This profile editing view lets users update their personal username and homepage. Up to this point, each user has a blank profile after signing up.

Following this tutorial, you’ll generate a username based on the user’s email address when saving a new user in MongoDB. Because usernames should be unique throughout your platform, you’ll take care of duplicates and generate a funky alternative 😉

hapi Series Overview

Continue reading

University Enrollment Required

Future Students benefit from value packed videos and tutorials.

Enroll to receive exclusive content or sign in if you’re already a Future Student.

Enroll me for $15/mo

Explore the Library

Find interesting tutorials and solutions for your problems.