D
D
Daniel_Cap2022-03-20 21:04:12
Node.js
Daniel_Cap, 2022-03-20 21:04:12

How to run node js on direct admin?

Hello! used to use vps but recently switched to a subserver without ssh access. All I have is direct admin (which I haven't used before) and ftp. In direct admin, you can somehow run node js applications, and it even seems to work, but when you go to the url, instead of the answer "hello world" it says "It works! NodeJS 16.13.2".

Google has 0 information on how to run node on this. Maybe there are experts on how to do it right?

js code

const express = require('express')
const app = express()
const port = 3000

app.get('/', (req, res) => {
  res.send('Hello World!')
})

app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})


What he wrote in direct admin:

62376c5944488699335575.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question