Hosting Angular fullstack project

460 views Asked by At

I started a new Yeoman angular-fullstack project (client-angular.js, server-node.js) (generator: https://github.com/DaftMonk/generator-angular-fullstack) I have 2 seperated directories for client and server, I want to launch the app but the deployment don't show any index.html file,

The question is, Should I make 2 different hosts for the server and the client? if no, how can I host and use the united projects?

2

There are 2 answers

0
avn On BEST ANSWER

No, it is not needed to create 2 different hosts for the server. The server needs to point to app.js, usually located at server/app.js, as this is the entry point (instead of index.html) of your app. How this is done depends solely on the server you intend on using.

If you consider using IIS you can take a look at: Installing and Running node.js applications within IIS on Windows

As for the other deployment options, as laggingreflex said, "Heroku is the popular choice to host node.js projects". The angular-fullstack git site has more information on deploying to Heroku or Openshift.

As a side note:

Deploying to IIS requires a bit more attention than the information in the link specified. You need to set file access, create a web.config file as well as a few other stuff. At least, I had to...

0
Louis Novick On

You'll need a host that supports MongoDB assuming you kept the Database the same after generating your application. Heroku is a great option as it allows you to setup up plugins like mongolab or mongohq fairly easily. I would also recommend looking into Digital Ocean as they allow you to set up a droplet/server that has what you need for the application to run.

If you go with Digital Ocean and are a student check out https://education.github.com/pack. You'll actually receive $100 credit towards a new Digital Ocean account which will let you test things out.

Good luck!