Hosting a Cloud Foundry Node.js application - node.js

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.

Related

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.

Openshift 3 FREE- custom domain

I am trying to migrate my app from Openshift 2 FREE to Openshift 3 FREE. I've managed to do everything, but the custom domain. In OpenShift it was very easy - add an alias to the app + modify some CNAME records in your domain. Now I do not find it easy.
Could anyone elaborate?
OpenShift Online Starter does not support you being able to use a custom domain. Only OpenShift Online Pro support customs domains at this point in time.
The only way to have a custom domain with OpenShift Online Starter, is to use Cloudflare or other service which can act as a proxy in front and which accepts requests for your custom domain name and forwards on requests onto OpenShift at the generated hostname given you.

Do I still need to use a service like DNSimple if I want a naked domain for my Heroku app?

Researching past posts makes it seem like you have to use a service like DNSimple in order to have a naked domain (i.e. "example.com") for Heroku apps. I am wondering if that is still true, or if I can achieve this using only my app server.
I am using Namecheap BasicDNS and my app is a node/express app hosted on Heroku.
Thanks in advance for any tips. I am just trying to make sure before I purchase. Thank you.
You can't point your apex domain to an hostname (hence to Heroku), because you can't use a CNAME for the apex.
Consequently, the only way to point your root domain to a service like Heroku is by using a DNS provider that provides a CNAME-like feature for the root domain, that is what DNSimple calls ALIAS.
You can also find more information in the Heroku documentation.

Azure App Service - My Host file

I published my app on Azure App Service.
I don't want to buy domain for now.
I just want to use my local Host file to connect to my Azure App with the futur domain I will buy.
I added an entry in host file:
ip.ip.ip.ip mywebsite.com
But how could I configure my Azure App?
This will not work. Azure App Services work on the basis of DNS Names. By adding the above entry in the host file, the record will reach the App Services Front-End Servers. However, they will not be able to map the domain name to a web app and this will result in a 404 error.
You will have to map a domain name to your Azure Web App in order to get this working. This implies that you will need to own a domain name, this in turn implies that you need to buy a domain name. :-)
If you want to use an IP address, you can use a cloud service web worker role (probably with a reserved IP, if you don't want a dynamic IP) instead of an Azure web app.

How to publish nodejs website

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

Resources