I have completed my project.
My stack :
Front-End UI => Reactjs
Back-End => Nodejs/Expressjs + MongoDB
And below is my project structure
containing both the folders:
project_Name > client + server
project_Name
is the main folder
client
and server
are the separate folders both are inside project_Name
folder.
And inside client
and server
folder I have installed the respective npm modules (reactjs + nodejs)
My API end point
is running on localhost:8000
and reactjs
on localhost:5000
So now I want to add my project to github
repository.
I am confused how to achieve that?
Do I need to push both client and server side code on separate 2 different gits?
Or
I need to upload just project_Name
folder containing both side project files?
But is it so then how can I do that?
Since before pushing to git
, the directory should have the package.json
file and node_modules
which will be only inside the client
and server
side folders.
These are the git
commands to push the project I am using:
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/vik.........git
git push -u origin main
But I don't know in which folder I have to initiate the repository
first?
Let me know the solution please .
Thanks!