Advertisement
uopspop

Untitled

Mar 12th, 2021
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. const express = require('express')
  2.  
  3. const app = express()
  4.  
  5. const port = process.env.PORT || 3000 // you need process.env.PORT to comply with Heroku's port choice
  6.  
  7.  
  8.  
  9. app.get('/', (req, res) => {
  10.  
  11. res.send('Hello World!')
  12.  
  13. })
  14.  
  15.  
  16.  
  17. app.listen(port, () => {
  18.  
  19. console.log(`Example app listening at http://localhost:${port}`)
  20.  
  21. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement