aiwodemaya Posted 4 hours ago Posted 4 hours ago Hello, I am trying to deploy a Node.js application on my account (domain: 520520.helioho.st), but it fails to start. The frontend application shows a generic "Failed to connect to server" error. The most critical issue is that the Node.js logs in the Plesk panel are completely empty, which makes it impossible to debug. We have simplified the backend code to the absolute minimum to diagnose the issue, and it still fails to run. Here is the test code for index.js: const http = require('http'); const server = http.createServer((req, res) => { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Server is working!'); }); const PORT = process.env.PORT; if (PORT) { server.listen(PORT, () => { console.log(`--- Test server listening on port ${PORT} ---`); }); } else { console.error('Error: PORT environment variable not set.'); } My package.json only includes {"dependencies": {}} for this test, so there are no external dependencies. My Node.js configuration in Plesk is: Application Root: /httpdocs Application Startup File: index.js Even with this extremely simple setup, the server does not run and no logs are generated. This suggests there might be an issue with the Node.js environment on the server itself. Could you please check if the Node.js service is running correctly for my account and why it is not generating any logs? Thank you. Quote
Unknown025 Posted 3 hours ago Posted 3 hours ago Just to make sure, did you enable Node.js before trying to use it? In Plesk, there's a toggle button to enable/disable Node.js, which requires an Apache restart (i.e. ~2 hours) to take effect. If you've already done all that, an administrator will look into it in the morning (it's nighttime here in the US). Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.