SHARE
TWEET

Untitled

a guest May 26th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const express = require('express')
  2. const bodyParser = require('body-parser')
  3. const cors = require('cors')
  4. const app = express()
  5. const apiPort = 3000
  6.  
  7. app.use(bodyParser.urlencoded({ extended: true }))
  8. app.use(cors())
  9. app.use(bodyParser.json())
  10.  
  11. app.get('/', (req, res) => {
  12.     res.send('Hello World!')
  13. })
  14.  
  15. app.listen(apiPort, () => console.log(`Server running on port ${apiPort}`))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top