Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Deploy MEAN stack to my hosted server?

I have a great working website built with MEAN and works great locally. i wish to deploy it on my server, but i never deployed a website other than uploading the files to my website ftp.

Tutorials anyone?

like image 968
user349072 Avatar asked May 20 '14 12:05

user349072


3 Answers

Another good starting point would be Digital Ocean, they offer a one click install MEAN stack, with tutorials. https://www.digitalocean.com/community/tutorials/how-to-use-the-mean-one-click-install-image

like image 86
JoeLee Avatar answered Nov 19 '22 21:11

JoeLee


I have just deployed my MEAN Stack application on Heroku cloud application environment. The deployment steps are easy.

Steps to deploy:

  1. Your mean stack project structure should be like this. This is very important step. The bottonline is your package.json and server.js should be under your root directory. Have a look at the link to know more about the structure.
  2. Clone your remote repository locally i.e. git clone https://github.com/heroku/node-js-getting-started.git
  3. Go inside the cloned repository e.g. cd node-js-getting-started
  4. Run git add .
  5. Run git commit -m "Sample"
  6. Run Heroku login (It will ask you to press any key and then open up the browser and ask you to click login. After logged in closed the browser instance.
  7. Run heroku create myApp --buildpack heroku/nodejs. Note: Buildpacks are responsible for transforming deployed code into a slug, which can then be executed on a dyno. More information
  8. Run git push heroku master. Your deplyment will start.
  9. Once deployment is done, you will see the complete deployment logs on command prompt terminal
  10. The application is now deployed. Ensure that at least one instance of the app is running: heroku ps:scale web=1

  11. Run heroku open. It will run your deployed instance.

  12. Run heroku logs to view information about your running app. More information

You can find more details visiting following links:

https://devcenter.heroku.com/articles/getting-started-with-nodejs#prepare-the-app https://devcenter.heroku.com/articles/deploying-nodejs

like image 2
immirza Avatar answered Nov 19 '22 21:11

immirza


Start from here... https://github.com/linnovate/mean#hosting-mean What operating system do you plan to host it on?

like image 1
Lior Kesos Avatar answered Nov 19 '22 23:11

Lior Kesos