Lesson 19. Creating and reading your models

In lesson 18, you constructed your user model and built an index page to display users on the same page. In this lesson, you add more functionality to your application by focusing on the create and read functions of CRUD. You start by creating an EJS form that handles a user’s attributes as inputs. Then you create the routes and actions to handle that form data. Last, you build a show page to act as the user’s profile page.

This lesson covers

  • Constructing a model creation form
  • Saving users to your database from the browser
  • Displaying associated models in a view
Consider this

With a new way to create courses for your recipe application, you’re finding it tedious to add individual documents ...

Get Get Programming with Node.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.