23

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?

howrad
  • 1,066
  • 2
  • 12
  • 32
user349072
  • 493
  • 2
  • 5
  • 12
  • It is going to be difficult if you don´t have a web server with root access. If you do, log onto your server, install (M)ongoDB, (E)xpress.js, (A)ngular and (N)ode.js, upload your files to the server, navigate to destination directory and execute. – Amberlamps May 20 '14 at 12:20
  • 1
    You need a server with shell access or a hosted Node.js service such as Heroku. After that it's as simple as installing node (if you have shell access), installing your dependencies and running it. – Ben Fortune May 20 '14 at 12:55
  • 2
    I am also trying to learn this myself, and found this tutorial http://justinklemm.com/grunt-js-deployment-ssh-git/ – klode May 22 '14 at 15:10

3 Answers3

2

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

JoeLee
  • 133
  • 1
  • 1
  • 10
2

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

TheKingPinMirza
  • 7,924
  • 6
  • 51
  • 81
1

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

Lior Kesos
  • 294
  • 1
  • 5