You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let port = process.env.PORT || config.server.port
const host = process.env.HOST || config.server.host
const start = () => {
app.listen(port, host)
.on('listening', () => {
console.log(`Vue Storefront Server started at http://${host}:${port}`)
})
.on('error', (e) => {
if (e.code === 'EADDRINUSE') {
console.log(`${port} already in use, trying ${port + 1}`)
port = port + 1
start()
}
})
Indeed, it does not increase the port number, but concatenates 1 after the port. For example, if port 8080 is used, then this code will try with 80801 and not 8081.
The text was updated successfully, but these errors were encountered:
The following code is probably not what you want:
Indeed, it does not increase the port number, but concatenates 1 after the port. For example, if port 8080 is used, then this code will try with 80801 and not 8081.
The text was updated successfully, but these errors were encountered: