I'm trying to configure an HTTP server using Ubuntu 20.04 but I can't make any requests to the server. for example a simple express server like this
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 at http://localhost:${port}`)
})
on exmapleIp:3000 just wouldn't work I tried Nginx and same result happened here's the UFW
Status: active
To Action From
-- ------ ----
Nginx Full ALLOW Anywhere
5432/tcp ALLOW Anywhere
22/tcp ALLOW Anywhere
80/tcp ALLOW Anywhere
8080 ALLOW Anywhere
Nginx Full (v6) ALLOW Anywhere (v6)
5432/tcp (v6) ALLOW Anywhere (v6)
22/tcp (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
8080 (v6) ALLOW Anywhere (v6)
I did tried disabling ufw but no luck with that neither. I did actually run Postgres and I was able to connect to it using PGadmin but no luck with requests