How to publish nodejs website - node.js

As I have no experience with website publishing I was wondering with how do you publish a AngularJS (front end) + NodeJS (backend) website on some domain. I have researched into some of companies such as WindowsAzzure , AWS and Softlayer but am still not sure. I have already bought the domain from godaddy but how do I run my server instance on these web services and point it to my domain?
Any help will be highly appreciated?
Thanks

I would recommend heroku as an application host and it does node out the box
https://devcenter.heroku.com/articles/getting-started-with-nodejs
It would be best if you used git, then you can push your site to the heroku remote host
you can also add in your domain https://devcenter.heroku.com/articles/custom-domains
but you also get a free one in at 'name'.herokuapp.com
This is also free so long as you come in under the usage theshhold, Should it become a successful app then you can scale out the resource
I have no association with heroku, other than hosting my own node apps on it

Related

If I host my nodejs application on Heroku or other hosting platform can I ignore serving my app using HTTPS?

I have started creating my own nodejs app (for the first time) that I hope to deploy at some point, perhaps to Heroku or another platform.
I need for my app to encrypt traffic namely for user passwords and sessions (note there is no other obviously sensitive data).
I started looking into serving my app using HTTPS (SSL) however I am now wondering if I need this. If my app is to be hosted and deployed using Heroku/other platform won't all requests be trafficked through their servers presumably using HTTPS by default? I am guessing that the request will then be routed using HTTP to my application, although I am struggling to understand how this works. Ultimately I would like to know if I can ignore worrying about paying for SSL certification and such like when it will not matter in this hosting environment?
Help much appreciated. Matt.
If you are using heroku then you must be using paid dyno( hobby or professional) and heroku provides free SSL to all paid dynos. Furthermore if you think that at some point you can switch hosting then there is always freessl available via Let's encrypt.
Heroku serves all requests with and without SSL in default herokuapp url.
Use cloudflare free plan. Open a free account in cloudflare, Copy the DNS. Then set the DNS in your domain service provider (godaddy or sth), then change the Cname config for the website inside cloudflare. Now you have a free certificate.

How can I link my Domain that ive purchased on NameCheap to my React Project?

Ive been trying to deploy my react app with my Domain that i bought on NameCheap.
Couldnt find any answer (maybe, I am searching with a wrong keyward).
Do I use Node.JS to connect my Domain or is it possible to use the domain just with React?
I think you are confusing Domain names and Hosting.
Your app (React or React + Node or any other framework) needs to be hosted on a server (which can be a 'cloud' server or VPS - virtual private server). Well-known hosting services include Amazon (AWS), Heroku, Now (Zeit), DigitalOcean, etc.
Regardless of the hosting service, you will usually end up with a numeric IP address that points to your deployed application.
Domain name hosting is the other 'half'. When you buy a domain, you still have to set it up, i.e. you have to define the DNS (domain name service) entries for that domain, be it for serving a web site or app, a mail exchange, etc.
Your Domain name provider usually has an interface that allows you to edit DNS entries for any domain you purchased with them. This is where you will make the connection between your Domain name and your hosted app.
A typical top-level entry, known as an 'A' entry will be:
mydomain.com A 91.223.9.9
meaning route requests to mydomain.com to IP address 91.223.9.9 (the IP address you will have retrieved from your application hosting service).
If your project is not requiring node.js running in background, it is absolutely possible to host it with any hosting provider, including but not limited to Namecheap. If you purchased a hosting from them (or any other hosting provider) and successfully build your application (i.e. it works for you locally), just upload the contents of /build folder to your hosting server.
If your hosting provider is using cPanel (Namecheap does), this usually means that you should upload it to ~/public_html/YOUR_DOMAIN_NAME.
If your application does require node.js, there are few hosting companies that offer this as well. I am not sure I'll be able to make any advertisements here, so please ask around. Webhostingtalk is a good place to start.

Deploy MEAN application

I just learned the MEAN stack and I locally developed/tested an app. Now, I want to deploy this application to the internet so the world can use it. I don't know how to do this and am lost.
So far, this is what I think is needed. Please correct me if I'm wrong.
1) Purchase a domain (done using Google domains)
2) Find a host for that domain (using Hostgator)
3) Deploy mean app to a cloud service (like Azure, AWS, Heroku, Digital Ocean)
4) ???
5) Fiddle with some settings so the user can access my web app on mydomain.com
What is a recommended cloud service to use? This is my first time doing this so help appreciated!
There are a lot of articles on the web already(why not google first?)!
Here are some:
Deploy MEAN
Deploy Your MEAN Stack Apps to Heroku
Running Mean.js App on Azure App Services with Continuous Integration and Delivery
Bossable - MEAN Stack Deploy on Azure
John Papa - Deploying Angular on Azure
Deploying a MEAN App to Amazon EC2 (Part 1)
Deploying a MEAN App
Stackify - Why Azure Deployment Slots are Awesome and How to Use Them
[express, angular, mongo, mongoose, deploy, digitalocean, ssh, Heroku, node]
I would suggest you to use AWS for these kind of stacks and in AWS you can use beanstalk and you don't need to care about management.
https://aws.amazon.com

Deploying Node.js express and MySQL application without using any cloud platform

I have my Nodejs express application running on my local computer with mysql DB. Now, I want to deploy this application to a web server.
My problem is, I haven't done this before , so I thought a quick google will give me clue and lead me somewhere. All I have found is deploying to Amazon, Azure, Heroku, Digital Ocean and so on which provides to the best of my knowledge a cloud service.
I use domain factory, they are not cloud. I use bit bucket as my source control. How do I deploy my node server on the server of domain factory.?
After some hours of search ; i found some steps but I have tried none seems to work out.
I found this information,and others but there seems not to be a clear cut guide to do this apart from using a cloud service to push your project them.
Does anyone have a link or a guide as to how I can host my application
http://www.clock.co.uk/blog/deploying-nodejs-apps
It is incredibly easy to deploy your node.js express app to Heroku.
Just follow this tutorial to understand how to deploy a node.js app to Heroku.
Once you have understood it, you will be able to deploy your app to heroku with a simple "git push heroku master".
You can continue using bitbucket as your git repo for source control. You can simply define spearate git remotes for bitbucket and Heroku.
As for mysql: There are plenty of "MySQL as a Service" solutions out there for Heroku, such as the cleardb Heroku add on.
By using the free tier for Heroku and cleardb, you can probably run your app for free on Heroku.

Hosting a Cloud Foundry Node.js application

I have a Node.js app that I'm building and deploying to Cloud Foundry. I know that Cloud Foundry dose not allow pointing a domain name to it's server, but I'm just wondering if there are other options to deploy a production version under a unique domain name instead of the standard app.cloudfoundry.com.
I read somewhere that Cloud Foundry would be offered as a service with some hosting providers, but can't seems to find any yet.
Thanks.
Per Andy Piper's Comment > "CloudFoundry.com should offer custom domains etc when the commercial/production version goes live before the end of the year. Other providers like AppFog do offer CloudFoundry hosting already."
You could use something like Pivotal Cloud Foundry (PWS)
https://run.pivotal.io/ that let's you deploy apps with cf and offers a domain managment where you can add private domain and map the route of your cfapps.io domain to your DNS
For instance if you want to add a route like this
example.yourdomain.com to your cloudfoundry app
Create a new domain:
cf create-domain 'MY ORG' yourdomain.com
and then you can create a mapping from the app to your DNS record on CF
cf map-route APP_NAME yourdomain.com --hostname example
Then in your DNS manager update the record to point to your app cfapps.io domain
DNS Record
example ==> myCFapp.cfapps.io
Hope it helps.
I bought a debian vps and installed everything i needed on it. redis, mongodb, node, git. there's also node-jitsu that looks pretty good if you want to host your db at a cloud provider.

Resources