Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const express = require('express')
- const bodyParser = require('body-parser')
- const cors = require('cors')
- const app = express()
- const apiPort = 3000
- app.use(bodyParser.urlencoded({ extended: true }))
- app.use(cors())
- app.use(bodyParser.json())
- app.get('/', (req, res) => {
- res.send('Hello World!')
- })
- app.listen(apiPort, () => console.log(`Server running on port ${apiPort}`))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement