I am using console.info() to send a message to the console when I run npm start
//Imports
const express = require("express")
const app = express()
const port = 3000
...
//Listen on port
app.listen(port, () => console.info('Listening on port ${port}'))
This works to listen on port 3000 but the message returned to the console is "Listening on port ${port}"
Any help?
You need to place the variable outside the backticks and add it with a plus sign, like this:
//Listen on port
app.listen(port, () => console.info('Listening on port') + $port)