Please read the guide carefully and don't skip any parts without reading them. This guide is here to help mainly people new to the mern stack (or full-stack dev in general). Only move onto the next step once you have completed the sub-steps to the previous step!
You can use this guide to work through the full-stack, however it doesn't specify anything about pushing to github. This is why this guide is here to help with that.
- Create main root directory (This will be your "project" folder. Either in terminal:
mkdir [project-name]or manually)- Go into the created directory:
cd [project-name]
- Go into the created directory:
- Create client dir:
npx create-react-app client- Once React installs, delete the .git folder manually or look up command
rm -rf .git12. - Once done,
cdback out to root.
- Now create a server dir (
mkdir server)- Use this --> MongoDB guide3 to setup the back-end.
- Once the above points are complete,
cdout to root dir- Use
git initto initialize the local repo (for the entire project)
- Use
- You now have a full-stack app on GitHub CONGRATS!
P.S. REMEMBER TO SAVE THAT PERSONAL ACCESS TOKEN BECAUSE YOU HAVE TO REGEN EACH TIME YOU WANT TO SEE IT!!!
Footnotes
-
https://stackoverflow.com/questions/61573115/rm-rf-equivalent-for-windows-powershell ↩
-
https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/delete-local-git-repository-repo-command-windows-linux-rm#:~:text=If%20you're%20familiar%20with,files%20and%20folders%20it%20contains. ↩
-
https://stackoverflow.com/questions/60152507/how-to-upload-a-full-stack-reactjs-nodejs-socketio-project-to-github-by-gi ↩
-
https://stackoverflow.com/questions/17659206/git-push-results-in-authentication-failed ↩
-
https://stackoverflow.com/questions/68775869/message-support-for-password-authentication-was-removed-please-use-a-personal ↩