The only experience I have with deploying something is via git onto Heroku. How do I deploy an entire website onto a go daddy VPS?
I downloaded puTTY(SSH) and was able to connect to the server, from there I installed nvm and it’s now allowing me to use node and NPM. If I use the ls command from the bash terminal it doesn’t show any files. How do I actually upload my project onto the server and have them displayed on the website?
doing it with git and Heroku was easy I just created a Heroku link, logged in and pushed my application with GIT.
I’d like to deploy a basic MERN website to a GoDaddy VPS and have it displayed on the intended domain but I’m sort of lost at this point.
I have no experience with GoDaddy VPS, but it sounds like you get a VM/Machine that is your server, which is common with few hosting services out there.
The good thing is you can do whatever you want, the bad thing is choosing what. The easiest thing you usually can do is use git to clone your repository into the VPS machine, and setup everything from there. You have complete control over this sort of setup usually.
Alternate approaches could be installing some software to do some deployment management, either on the VPS or an external service.
The general idea is if you have a machine sitting in the corner of your room, how would you setup your application on it to run “in production”? That’s about the level of complexity your looking at. Your welcome to look up specific guides for your MERN stack, and how to manage one in production.
which pushes to a folder outside of my public_html folder on my VPS. Then the .cpanel.yaml file runs which has commands setup to copy from the git-<username> folder over to the public_html folder (among other things). You can run shell scripts and anything else you can run on the command line from here too (such as npm run build or npm run start).
using git clone https://github.com/username/repo.git is one way, another with ssh is to use scp.
scp -r ./ email@example.com:~/project the -r flag is for recursive to allow directories. This would be run from your machine, not theirs.
FileZilla should also work I believe, haven’t used it in some time though.
On your server you might want to install something like pm2 to keep your app running. but this will likely mean that your app will not be running on port 80, but you can aslo setup nginx to port foward to your app.
There are honestly probably something like a dozen ways you can do this including using containers with something like docker.
All that said honestly if you don’t take the time to learn your way around a linux shell your simplist way to go about it is to setup a domain with GoDaddy or another service and set up heroku to use that domain for the site.
I personally use Digital Ocean for my website, have it setup with nginx a SSL cert through LetsEncrypt and use docker for deployment. Its honestly taking me awhile to get even a minor grasp on some of this.
That said the documataion on Digital Ocean for doing varius things with it are great and can walk you through doing a fair bit, and may even help with GoDaddy’s VPS. I don’t know what type of linux environment GoDaddy uses though.
If you, or anyone else would like I can send a referal link that gives you $100 credit to play with for DigitalOcean, just send me a pm and I’ll get back to you.
Thank you all this information was exactly what I was looking for.
Man learning my way around a Linux based shell is like learning something completely new. I feel like I need to take a whole course on this stuff… it’s taken me all weekend just to get this thing on the domain.
I’ve been able to solve problem after problem but just trying to do something as simple as install an SSL certificate is pretty complicated or adding WWW to my website domain