Skip to content

Commit

Permalink
docs(express): usar puerto especificado por vite (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
AntaresGT authored Oct 22, 2024
1 parent 57b1d1c commit cd2d30f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/integraciones/express.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,14 @@
importar httpDevServer desde 'vavite/http-dev-server'
const servidor = express()
const puerto = process.env.PORT || 4500
mut puerto = process.env.PORT || 4500
servidor.use('/', (req, res) => {
res.send('¡Hola, mundo hispano hablante!')
})
si (httpDevServer) {
puerto = httpDevServer.address().port
httpDevServer.on('request', servidor)
consola.escribir(`Servidor corriendo en el puerto ${puerto}`)
}
Expand Down

0 comments on commit cd2d30f

Please sign in to comment.