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.
Please help.
*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 have removed your contact information. This is a public forum that gets a lot of visitors, both human and scripted, so posting contact information is not advised.
If using GitHub is a requirement, then I assume that you don’t need to deploy the app to GitHub pages. If you just need to make all of your code viewable, then just put it all in the same repository.
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.
I could not upload the whole client and server folders it gave a fatal error in my terminal. I uploaded(dragged into repo) all the individual files in each folder besides the node modules.
While it is now in my repo can I put it in client and server folders?
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.