Output in browser using Express Nodejs

I install nodejs with express in server (subdirectory in ftp,path is /var/www/html/admin) and in admin folder i created file "app.js" which is working in xshell fine and showing message in console

here is my app.js

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}!))

but now i want to show result in browser,how can i do this i tried with following urls but not working for me

http://myurl.com/admin:3000
http://myurl.com/3000/admin


#node.js #express

3 Likes2.15 GEEK