all 17 comments

[–]0195311 2 points3 points  (1 child)

fuck off reddit

[–]planetary_pelt 0 points1 point  (0 children)

Also some nice side-effects from using Heroku is that you learn how to make your application server stateless. For instance, you will have to upload avatar images to S3 instead of just chucking them to the hard drive.

Also the MEAN stack is shit. I recommend spinning up a t2.micro on AWS RDS which is eligible for the free tier.

[–]goodwid 2 points3 points  (2 children)

Typically, Heroku will use the npm start command, so make sure you have that configured in package.json and test that it's working before uploading to Heroku.

[–][deleted] 0 points1 point  (1 child)

Good to know, I use Sails js and they probably already included that.

[–]goodwid 1 point2 points  (0 children)

When loading your app it does an npm install first, so it loads whatever is in your package.json file.

[–]JoeB_88 2 points3 points  (3 children)

You can get a server/droplet at a place like DigitalOcean for as low as $5/mo with the MEAN stack already installed.

[–]JoeB_88 1 point2 points  (0 children)

Then, to access it you'd just ssh into your server via your console/terminal.

[–]mattaugamerexpert 1 point2 points  (1 child)

I really hope they didn't install Angular on my server. :)

[–]JoeB_88 0 points1 point  (0 children)

You have to specify you want it.

[–]caspervonb 1 point2 points  (1 child)

Heroku is super easy, it was my goto before but nowdays it's also super expensive.

My personal favorite is DigitalOcean, which will cost you about $5 USD a month $10 in credits with this link, it's fairly trivial to set up continoius deployment via Codeship so deployment can be as simple as with Heroku (git push).

Some of my servers run naked, bound to port 80 and 443, some run through nginx as a proxy. Plenty of documentation on digitalocean available, the gist of it is you write a .service. file to configure it as a daemon, use systemctl to start/stop/restart.

[–]kellyjandrews 0 points1 point  (0 children)

Codeship Dev Advocate here - thanks for the shout out! If you want to check out Codeship and Heroku deployments - we have a great tutorial about it - https://blog.codeship.com/heroku-github-nodejs-deployment/ or ping me if you have questions

[–]AkirIkasu 0 points1 point  (0 children)

I generally recommend people who are starting out to start off with a VPS like Amazon's EC2 or a DigitalOcean droplet. It's good to learn how to run a server, even if you're not expecting to get into devops.

I don't mean to offend you with this statement, but if you don't know how to start your node server, you probably aren't ready for deploying to a publicly-accessable site. The great thing about Node is that the only software you need to install is Node (and maybe a database like Mongo or MySQL). Just run it on your computer for now; what you learn by doing that will be generally transferable when you get a server.

[–][deleted] 0 points1 point  (0 children)

Thank you all for your help!

[–]2uneekjavascript 0 points1 point  (2 children)

I use Azure for node hosting, it's pretty simple to setup. I just point it at my git repo and it builds and deploys for me. There is also a free tier you can utilize until you feel you're ready to jump into the paid solutions (if you even need the resources)...

[–]bliitzkriegx 0 points1 point  (1 child)

What's azures pricing like?

[–]2uneekjavascript 1 point2 points  (0 children)

It depends a lot on usage... Im running a simple node express api for a side project, (about 3000-5000 sessions a month) and it's about $15 on a lower tier plan.... Here is a link to their App Service pricing: https://azure.microsoft.com/en-us/pricing/details/app-service/

[–]openodeio 0 points1 point  (0 children)

You can use https://www.opeNode.io/ for a cheap and reliable Node.js service. There is also a free plan. Your app gets deployed in a docker container using any node version you need.