Join Alexander Zanfir for an in-depth discussion in this video Create a registration endpoint with Express, part of MEAN Stack and MongoDB: Development Techniques.
- [Voiceover] Let's now create our register endpoint…with express in Mongo.…We will make it using app.post…and specify the location to match what we provided…in the front end, which was /auth/register.…And then we can test it by outputting the request.body.…So let's rerun our Note app.…And then, let's go back to our Angular application.…If we hit Submit at this point…and then go back to our console,…we can see we received our test object.…
Next we will pass the actual email and password.…So let's go back to Brackets.…And reload our front end.…Now let's go inside our auth.html.…We already have the ng-model on the password,…so now we just need it on the email.…And since I'm using the controller as syntax,…I'll need to put auth in front.…And I also want to create an object called the user,…which will contain both the email and password.…And let's switch our password…to use the same controller as syntax, auth.user.password.…
And then finally, we just need…to update our compare-to directive…with auth.user.password instead.…
- Installing and setting up your MEAN toolset
- Making an Angular post form
- Sending posts
- Displaying messages
- Creating a registration form
- Saving users
- Associating users with posts
- Authenticating users at login
Skill Level Intermediate
2. Message Posting
3. Display Messages
Save a user with Mongo13m 26s
5. Logging In
Next steps2m 5s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.