Articles on: Web Hosting
This article is also available in:

How to create a "Hello World" application?

Why create a "Hello World" application?

When your Node.js application won't start or displays errors, it can sometimes be difficult to tell whether the problem comes from your code or from the server configuration.

A small Hello World application lets you quickly verify that the "Setup Node.js App" configuration on your Hodi hosting is correct.


How to create a "Hello World" application?


  • Log in to your hosting via cPanel.

In the "Setup Node.js App" section, create a new application with:

  • Node.js version: choose the recommended version for your project.
  • Application root: for example /home/youruser/helloworld.
  • Application URL: choose a subdomain or directory (e.g., test.yourdomain.com).
  • Application startup file: app.js.


  • In the specified directory (helloworld), create a file app.js with the following content:

const http = require('http');


const hostname = '0.0.0.0';

const port = process.env.PORT || 3000;


const server = http.createServer((req, res) => {

res.statusCode = 200;

res.setHeader('Content-Type', 'text/plain');

res.end('Hello World from Hodi!

');

});


server.listen(port, hostname, () => {

console.log(Server running at http://${hostname}:${port}/);

});

  • Click on Restart App.


What next?

If "Hello World" works but your project does not, the problem comes from your code or its dependencies.


If even Hello World does not work, contact Hodi support and include the error message.

Updated on: 14/02/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!