Categories Futureflix

12 posts

Auto Added by WPeMatico

๐ŸŒŸ learn hapi โ€” Update Mongoose Models for JSON Responses

While creating the Futureflix API, you noticed that the JSON representation of documents contains the _id and version key __v. The _id field feels wrong due to the underscore prefix, so letโ€™s remove it and keep only the id field. The version key __v isnโ€™t necessary in the response at […]

๐ŸŒŸ 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 […]

๐ŸŒŸ learn hapi โ€” Add CSRF Protection on Forms and API Endpoints

During the last weeks, you made tremendous progress on โ€œlearn hapiโ€ and your Futureflix app grows in functionality. Up to this point, you rely on hapiโ€™s built-in security mechanisms. We didnโ€™t care about adding custom protection yet (which is totally fine). That changes now and itโ€™s what youโ€™ll tackle in […]

๐ŸŒŸ learn hapi โ€” Implement a User Profile Editing Screen

You probably follow along this โ€œlearn hapiโ€ learning path and your Futureflix app already contains a sign up and login to onboard users. But thereโ€™s no personal user area. Users canโ€™t edit their information in a profile editing screen, yet. At the end of this tutorial youโ€™ll have this functionality […]

๐ŸŒŸ learn hapi โ€” Load the Userโ€™s Profile Picture From Gravatar Using Virtuals in Mongoose

Using Gravatar for profile pictures feels like the snake game on Nokia phones. You know, the Nokia phones that are still charged if youโ€™d find one in your winter jacket ๐Ÿ˜„ The older Nokia phones with model names like โ€œNokia 3210โ€ used to have a game installed called โ€œsnakeโ€. You […]