I am having trouble getting the Express framework for Node.js working. I can install a Node.js app with the installer, which works fine and is accessible in the browser through the site route I added. But after editing the included app.js file to implement an Express starter app, installing the package via npm, and restarting the app, I get a 404 error in the browser. The app is still accessible with curl http://127.0.0.1:9399
, so I know it is running locally. Here is what is in my app.js file:
const express = require('express')
const app = express()
const port = 9399
app.get('/', (req, res) => {
res.send('Hello world')
})
app.listen(port, () => {
console.log(`App is running`)
})
Any suggestions on how to make it publicly accessible?