User registration and login

To implement user registration and login, first, we will create an auth page that will house the two forms that we will use for registration and login. We can create the form view in the views folder and name it auth.ejs. Insert the following content into the file:

<%- include( 'partials/header.ejs' ) -%> <div class="columns">  <div class="column">    <h1 class="title">Register</h1>    <form action="/auth/register" method="POST">      <div class="field">        <label class="label">Full Name</label>        <div class="control">          <input class="input" type="text" placeholder="e.g Alex Smith"           name="fullName">        </div>      </div>      <div class="field">        <label class="label">Email</label>        <div class="control"> <input class="input" type="email" placeholder="e.g. ...

Get Server Side development with Node.js and Koa.js Quick Start Guide 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.