MERN project with handelbars

I’m making a MERN project but I decided to use handelbars for front end just to complete my node work and see if its working properly
and then replace handelbars with react

will it cause any issue ?

I wouldn’t do it.
Just create an API without the frontend and test it using Postman.

but things like editing a paragraph
I need a interface first to push data again on front end then edit it .
I have near to no experience with postman

With postman you can exactly do this.

1 Like

You’re not pushing data, you’re making GET, POST etc. requests and all of them can be done via Postman (or any other tool).
From API point of view editing data on frontend is just a GET request followed by POST/PUT/PATCH request.

For basic usage it’s not too complex, just download and try.

2 Likes

can you share some tutorials because I’m not able to edit entered data with postman

Did you try searching? There are tons of articles and tutorials on testing APIs using Postman.

https://www.google.com/search?q=api+testing+postman
https://www.youtube.com/results?search_query=Postman

Not really sure what you mean here?

1 Like

yes I’m watching a tutorial to make rest api

I wondering about patch request got it

one more Issue I’m facing is If I make api then I’ll not be able to use google authentication until I made the project but google authentication is the main component of my project cuz I’ll get unique id,name,etc from it and then distribute data accoring to that

You can mock just about anything without a front-end. But that doesn’t mean you have to. You do not need all of the back-end/API in place before you start writing front-end code.

But I see no reason why you would pick a templating language, just start writing the React code instead. An auth flow will likely require some front-end code anyway (like routing/redirecting, etc.).

1 Like

why I’m not doing both together is ,
this is my first time doing MERN
I dont know if I did something wrong then I have to start again

It’s a learning project, you are unlikely to get everything right the first time. Making mistakes and making corrections is all part of the process. I don’t see why you would have to “start again”. Code is not written in stone, you can change it however much you’d like.

Planning is good and getting a lot of the back-end done before writing the front-end is useful because you do not get distracted trying to juggle too many things at once. But you have to start the front-end at some point and it doesn’t have to be after all the back-end is in place. Besides, you would need to know all the requirements ahead of time which isn’t very likely for your first project.

1 Like

its not a learning project I’ve to make its a university project
yes all requirements are difficult to get but I watched a full MEN video with google auth so I’m more clear about requirement

start again means write a large part of it again

I don’t want to over-complicate things too much for you, but you should be able to request the Oauth token from Google even from postman, and than use it to make your auth queries.

It’s a “normal” flow, so I don’t see any particular reason why you shouldn’t besides some initial hiccups.

ooh,I tried to search tutorial but cannot found
can you share if you have some

just go on youtube and search for react API testing with postman… and how to fetch data in react

1 Like