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

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training