Welcome to the Linux Foundation Forum!

Implement server that listens on process.env.PORT

In almost all the laboratory exercises of the JSNSD course it is required to implement a server that listens on the port present in process.env. To do this, just add the following code in app.js?

const {PORT} = process.env
module.exports = async function (fastify, opts) {
fastify.listen(PORT)
......
}

thanks

Comments

Categories

Upcoming Training