“Express.js Hello World” Respostas de código

App Express App

const express = require('express')
const app = express()
const port = 3000

app.get('/', (req, res) => res.send('Hello World!'))

app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`))
Poised Penguin

exigir server.js Express

const express = require('express')const app = express() app.get('/', function (req, res) {  res.send('Hello World')}) app.listen(3000)
Itchy Iguana

Express.js Hello World

const express = require('express')
const app = express()
const port = 3000

app.get('/', (req, res) => {
  res.send('Hello World!')
})

app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})
Grotesque Grebe

Respostas semelhantes a “Express.js Hello World”

Perguntas semelhantes a “Express.js Hello World”

Procure respostas de código populares por idioma

Procurar outros idiomas de código