0

I am developing an online chat application in HTML, CSS and JavaScript. I am using node.js and socket.io to make it work.

I recently realized that I need to host my app on a server. Fortunately I found appFog which is free. I created a account and created a new node.js app. It looks like this:

appfog node.js app

Now this is where I am confused.

  • Why is there a domain name for my app. Do I use this domain name instead of 127.0.0.1? I currently use 127.0.0.1 as I am testing my node.js in local environment.
  • Say I want to deploy my app at my own webhost (which is 000webhost). Is that possible? Or do I need to use domain given by appFog?
  • Are there any tutorials that explain how to deploy a node.js application on appFog? (for newbs like me)
Joe Slater
  • 127
  • 1
  • 7
  • Hey hi there if you want to deploy your node.js app on a free hosting then there is only two options for you(which are best for you rather than others) one is [heroku](https://www.heroku.com/) and the other is [alibaba](https://us.alibabacloud.com/en) cloud which gives which you can use for 1 year free(i.e, free trial) by signing up with your paytm account and you get a free VPS with alibaba cloud for more information visit [here](https://technologyundefined.blogspot.com/2021/04/deploy-your-node-app-in-000webhost-node-js-and-can-we.html). – Gunjan Nayak Apr 09 '21 at 14:19

2 Answers2

0

127.0.0.1 or localhost is your local machine.

So if you want to deploy your app to another server either appFog or another server, you can't access your deployed app this way.

I don't know if the free AppFog version does allow you to use your own domain like www.mydomain.com

andi
  • 41
  • 1
0

When you host your site on AppFog (Free plan), it will ask a subdomain name. Then you will get a subdomain like testnow.ap01.aws.af.cm. Here 'testnow' is the subdomain.

To set your custom domain, you need to to migrate to paid plan.

There are good tutorial in their website

Tamim
  • 16