No Preview

Rizwan Khan

Posted on 9 August 2020

Ecommerce Back End Express Server Rest API

No Preview

Hi Everyone,

I have started creating an ecommerce MERN Stack Project on youtube, you can find link of youtube playlist below

https://www.youtube.com/playlist?list=PLB_Wd4-5SGAYsxD4JGaVdXll3PnoyI-AM

Here I am sharing my day to day video code for the people who is looking for Source code

Lets start with backend Rest Api Code

I hope you are familiar with npm init command

lets continue with server code

src/index.server.js

src/models/user.js

src/routes/auth.js

src/routes/admin/auth.js

src/controller/auth.js

src/controller/admin/auth.js

Time to time i will update this page and plz do like this page and subscribe our youtube channel

1

6K

2

No Preview

Rizwan Khan

India

Coding is an art and I love art

Explore more similar Post

8 Comments

Abhishek Jaiswal

22 July at 1:38

i have one problem in signup and signin , the same code in my laptop, doesn't run , its gives output message:something went wronng" instead of giving user created successfully

0
REPLY

Gopal Saw

6 October 2021

I have one problem with express validator with multipart-data , first middleware put validator not validate data, in case of first middleware put upload image and then validator then work. I want to put first all user request data validate and then file upload. (localFileUpload.single('profilePicture'),validateSignUpRequest,isRequestValidated,authController.register) This is work but validateSignUpRequest,isRequestValidated,localFileUpload.single('profilePicture'),authController.register not validate request. Please replay this issues and how to resolved it.

0
REPLY

Rizwan Khan

8 October 2021

Are you trying to upload image while doing signup

REPLY

H057 Kuldeep Sahu

25 June 2021

response not getting in Flipkart-series in getProductPage not given response. please help its show panding and network error.

0
REPLY

Nabin Joshi

28 August 2020

I have a question in admin and user api what if the same person is admin and user if the person is registered as the user it cannot override to be an admin because email is same and we are using synchronous hasing and comparing in user model if we are using synchronous bcrypt in server does it gets any problem and also in mongodb the data comes from the server. any suggestion

0
REPLY

Rizwan Khan

28 August 2020

Hi Nabin, As per the idea of this system you need to have two different email address one for user and one for admin and your second question about using sync function on server so it depends on the processing power of the server and yes it will block other services if processing power is slow, so my advice is to use async function and i will also update this code

0
REPLY

Nabin Joshi

29 August 2020

thank you

0
REPLY

tuanvu ngo

10 September 2020

so it is impossible to have a person who is both admin and user, right ?

0
REPLY

Rizwan Khan

10 September 2020

Yes for this application

0
REPLY

Shiva Siva

9 August 2020

iam a btech learning student can anyone please tell me

1
REPLY

Rizwan Khan

9 August 2020

I think i have given all possible answers to your queries

1
REPLY

Shiva Siva

9 August 2020

thank you sir ( or) bro

1
REPLY

Shiva Siva

9 August 2020

and how they will get the same updated price in their website within no time

0
REPLY

Rizwan Khan

9 August 2020

if you refresh page you will get new data from apis

REPLY

Shiva Siva

9 August 2020

bro iam having one doubt how affiliate websites get the price update from various websites like (eg:amazon,flipkart,etc)

0
REPLY

Rizwan Khan

9 August 2020

I am not sure about how affiliate websites work but for sure they have some public apis for product and their price so whoever will use those apis they can get updated prices

REPLY

Shiva Siva

9 August 2020

whats this code bro

0
REPLY

Rizwan Khan

9 August 2020

Hi Shiva, This is source code of current web development project series. Its an Ecommerce Project

REPLY