Skip to content

Instantly share code, notes, and snippets.

@ZaninAndrea
Created August 5, 2020 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZaninAndrea/d5e4055f0fbb32437ba4a1b74f5203a9 to your computer and use it in GitHub Desktop.
Save ZaninAndrea/d5e4055f0fbb32437ba4a1b74f5203a9 to your computer and use it in GitHub Desktop.
Minimal express.js example
const express = require('express')
const cors = require("cors")
const app = express()
app.use(cors())
const port = process.env.PORT || 3000
app.get('/', (req, res) => {
res.send('Hello World!')
})
app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment