简体   繁体   中英

How do I deploy a MERN application on a godaddy VPS

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.

Steps

  1. got to react app folder and do npm install && npm run build
  2. start the node server
  3. server react app build folder from your express routes

optionally you can use serve or PM2 to serve the build on separate port, but this will require you to run your MERN application on 2 ports

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM