Creating an application using express.js for the server and firestore database.

  Рет қаралды 28

Naga Mallika Balla

Naga Mallika Balla

Күн бұрын

process:
1.--Import Required Modules.
2.--Initialize Express and Firebase
Initialize App and Firebase:
Create an Express app instance.
Load Firebase credentials and initialize Firebase admin with those credentials.
Initialize Firestore database instance.
3.--Set the port number.
Configure EJS as the view engine and set the views directory.
Use body-parser to parse URL-encoded bodies.
Serve static files from the 'public' directory.
4.--defining a login route.
5.--Retrieve email and password from the request body.
Check if a user with the provided email exists in Firestore.
If the user exists, compare the provided password with the stored hashed password
using bcrypt.
If the password matches, redirect to /main.html; otherwise, send an error message.
6.--defining a signup route.
7.--Retrieve email and password from the request body.
Check if a user with the provided email already exists in Firestore.
If the user does not exist, hash the password using bcrypt and save the new user document in Firestore.
After successfully creating the user, redirect to the login page.
8.--Start the Express server and have it listen on the specified port.

Пікірлер
Firebase Emulator Tutorial | Local Development With Firebase
7:44
Redhwan Nacef
Рет қаралды 14 М.
Deploy NodeJS Express Application to Firebase as Function.
20:51
Srinivas Tamada
Рет қаралды 52 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
Creating a Backend API with TypeScript and Express
5:22
Tech Vibes
Рет қаралды 2 М.
React Js Tutorial - 11 : Mastering Non-Click Events in React || Cyberinfomines
13:30
My Coding Journey: Projects I've Created in the Last 4 Years
38:44
Tuhin Kanti Pal
Рет қаралды 197
Learn HTML with Tailwind CSS A Step by Step Tutorial
33:40
Rakibul Hasan
Рет қаралды 27
CREATE Your Own Project Section with HTML and CSS!
25:01
VSClass Online
Рет қаралды 47
MERN stack : Day 4
1:04:01
VTS SCHOOL
Рет қаралды 64
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН