Deploying full stack project to github

Hi

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 *

1 Like

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.:

Hope this helps :slight_smile:

hey @mraees93
I can help you over this . please connect me on skype for better discussion of project
thanks
Troy

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.

1 Like

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 think I just need to make my code viewable in repo so I’ll do that. If I get stuck I will connect with you on Skype or zoom. Thanks again

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.

However you organize it on your own computer (your local repository) will be how it’s organized on the remote.

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

When I tried to upload both the client and server folders via the terminal it gave a fatal error. I could just drag the files into the repo.

I wanted the repo to look like my local folder with client and server folders.

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.

1 Like
  1. Create your project folder
  2. Go into your project folder
  3. Make it a git repository (git init)
  4. Create a folder for your server
  5. Create a folder for your client

Both folders, server and client, need to have at least one file in it before you can see the folders on Github.

1 Like

hi @mraees93
sure you can connect me any time
thanks