How do I create a "Hello World" application?
Why create a "Hello World" application?
When your Node.js application won't start or is showing errors, it can be hard to tell whether the problem comes from your code or from the server configuration.
A small Hello World application lets you quickly check that the "Setup Node.js App" configuration on your Hodi hosting is correct.
How do I 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 version recommended for your project.
- Application root: for example
/home/youruser/helloworld. - Application URL: choose a subdomain or a directory (e.g.
test.yourdomain.com). - Application startup file: app.js.
- In the specified directory (
helloworld), create anapp.jsfile 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!\n');
});
server.listen(port, hostname, () => {
console.log(Server running at http://${hostname}:${port}/);
});
- Click Restart App.
What's next?
If "Hello World" works but your project doesn't, the problem lies in your code or its dependencies.
If even Hello World doesn't work, contact Hodi support with the error message.
Updated on: 17/07/2026
Thank you!