I am having trouble uploading my full stack app to github. I created a simple registration form with mern stack. I know how to upload react files to repo but I don’t know how to upload the server side to github. BTW as instructions I have to upload this task to github as my application for an internship.
*thanks for all replies guys, was definitely appreciated *
GitHub Pages doesn’t really do any back-end processes. It mostly handles simple HTML, CSS, and JS Web Apps. You usually want to use third party hosting solutions that can deploy Full Stack application. Here are a few:
You can also do a simple solution like REPL.it, where you just put your code and it will run it for you.:
I see when other people upload full stack code just to view on GitHub then it’s in client and server folders. How do I do that? Can I make those client and server folders in my terminal then upload the files in each? As you know full stack apps are lots of files I don’t want to leave it messy all in the same repo especially when I’m going to be reviewed on it for applying for an internship.
You’re going to have to explain what you’re doing here, because a git repo is just a record of changes to files: practically, just a record of all the files in a folder, in the exact same structure. You don’t have to arrange anything, that’s not how it works or what it is. If you initialise a git repo in a folder, that repo contains everything in that folder, including all subfolders
Then from your description (I assume you’re using some GUI) the remote will always be out of sync with your local, because it will have files in a structure that is different to what it actually is. I think you’re misunderstanding what GitHub is: it’s not just a place to store files. It’s a record of files and the changes made to them, and it’s the same on whichever computer you view it on. The file structure on your computer will be the same as it is on GitHub because it’s the same thing. Repos which have a server folder and a client folder aren’t doing anything special: their project folder just has two folders in it.
I think what you’ve done is tried to make a repo out of either the server or client folder, rather than the folder that they live in. You can’t then have anything outside of there as part of the repo
In what folder in your project is the .git folder? That’s the thing that makes git work, the thing that contains a record of your files and the changes to them. If it’s not in the root folder, delete it and reinitialise git in the project root, because it’s in the wrong place.