Fantastic article. Covered all major topics - Sign up, Login, Authentication using JWT, MongoDB through this app.
Here are few changes that I had to do as mLab is now part of MongoDB family.
Created an account with MongoDB Atlas
Created a cluster
In the cluster creation process, it will let you choose the type of Sandbox, AWS region. Once you are done with it, it will ask to create user and password for the database.
After created user and password, use the Connect to Application option which helps you select the type of app. Here it is Node and it will only give you the URI. I simply copied that URI to the MongoURI in the code (config/db.js)
Also, in routes/user.js file, I had to add this line at the end of file.
Fantastic article. Covered all major topics - Sign up, Login, Authentication using JWT, MongoDB through this app.
Here are few changes that I had to do as
mLab
is now part of MongoDB family.MongoURI
in the code (config/db.js
)routes/user.js
file, I had to add this line at the end of file.Hope this will help someone like me 😉
Yes, you are right! thanks for sharing !!
This is the process for new users.
POST localhost:3000/undefined/user/regi... 404 (Not Found)
dispatchXhrRequest @ xhr.js:178
xhrAdapter @ xhr.js:12
dispatchRequest @ dispatchRequest.js:52
Promise.then (async)
request @ Axios.js:61
Axios. @ Axios.js:86
wrap @ bind.js:9
sendDetailsToServer @ RegistrationForm.js:28
handleSubmitClick @ RegistrationForm.js:61
callCallback @ react-dom.development.js:188
invokeGuardedCallbackDev @ react-dom.development.js:237
invokeGuardedCallback @ react-dom.development.js:292
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:306
executeDispatch @ react-dom.development.js:389
executeDispatchesInOrder @ react-dom.development.js:414
executeDispatchesAndRelease @ react-dom.development.js:3278
executeDispatchesAndReleaseTopLevel @ react-dom.development.js:3287
forEachAccumulated @ react-dom.development.js:3259
runEventsInBatch @ react-dom.development.js:3304
runExtractedPluginEventsInBatch @ react-dom.development.js:3514
handleTopLevel @ react-dom.development.js:3558
batchedEventUpdates$1 @ react-dom.development.js:21871
batchedEventUpdates @ react-dom.development.js:795
dispatchEventForLegacyPluginEventSystem @ react-dom.development.js:3568
attemptToDispatchEvent @ react-dom.development.js:4267
dispatchEvent @ react-dom.development.js:4189
unstable_runWithPriority @ scheduler.development.js:653
runWithPriority$1 @ react-dom.development.js:11039
discreteUpdates$1 @ react-dom.development.js:21887
discreteUpdates @ react-dom.development.js:806
dispatchDiscreteEvent @ react-dom.development.js:4168
RegistrationForm.js:43 Error: Request failed with status code 404
at createError (createError.js:16)
at settle (settle.js:17)
at XMLHttpRequest.handleLoad (xhr.js:61)
HELP ME OUT!
sIGNUP , LOGIN BUTTONS ARENT WORKING .They are showing this error
:):):):):):):):):):):):):):)
i stiill didnt get to know on how you connected front and backend.plz let me now
It's really going to ,cause am having a hard creating the URI from mLab thanks.