1. Define a route in auth.route.js – router.post(‘/signin’, signin) 2. create a signin controller in auth.controller.js. 3. Install a package to …
1. Create a Footer.jsx inside the components folder. 2. Add Footer component in App.jsx 3. Go on Flowbite website in Footer components, …
1. Update form text input type email field type=’email’password=’password’. Add type=’submit’ in form button 2. Define onChange function in all text input …
Here is code for signup.jsx: import React from ‘react’import {Button, Label, TextInput} from ‘flowbite-react’import { Link } from ‘react-router-dom’ const Signup = …
Write a function in index.js:- app.use((err, req, res, next)=>{ const statusCode=err.statusCode || 500; const message=err.message || “Internal Server Error”; …
Install a package – npm i bcryptjs import it in auth.controller.js – import bcryptjs from ‘bcryptjs’ Add marked two line of code …
Create a route file “auth.route.js” in “routes” folder. auth.route.js: – import express from ‘express’ import { signup } from ‘../controllers/auth.controller.js’; const router=express.Router(); …
Add below given text in index.js: – app.get(‘/test’, (req, res)=>{ res.json({message:”API is working”}) }) Create a folder “routes” in “api” folder. Create …
Create a folder “models” under “api” folder. Create a file “user.model.js” in “models” folder. user.model.js: import mongoose from “mongoose”; const userSchema=new mongoose.Schema({ …
Install the database in the root folder not in the client folder npm i mongoose https://www.mongodb.com/atlas/database sign up on this website, choose …