Which is the best way(method) to host an mean appl

2019-03-06 08:17发布

问题:

I am new to this Web development. I need to know the different ways in which the application i developed can be hosted

回答1:

Here is a rough checklist with links:

  • For a MEAN-Stack you start with the node.js Installation, which delivers the command framework for the rest.

  • When you start from scratch, my recommendation for the next step is to install Angular 2 with the @angular/cli Package.

  • When you are familiar with the FrontEnd in Angular 2, you can install the expressjs server following this post.
  • So the backend and the frontend are there, but they have to talk to each other with e.g. the routing in express on the backend and the http client of angular 2.
  • When you don't have it, you have to install mongodb before you can connect via mongoose from express server (backend) to the database.

Others may propose other ways or even ready to use packages, which I've also used, but I'm using this approach first to learn and test on every step before to move forward.