Skip to content

Instantly share code, notes, and snippets.

@cramhead
Created April 2, 2018 15:09
Show Gist options
  • Save cramhead/7db17e87f7e4349f2d29383db37663fc to your computer and use it in GitHub Desktop.
Save cramhead/7db17e87f7e4349f2d29383db37663fc to your computer and use it in GitHub Desktop.
Index.js file without cors
import express from 'express'
const PORT = process.env.PORT || 3000
const app = express();
app.use('/', (req, res) => {
res.send(`Server says ${(new Date).toString()}`)
})
app.listen(PORT, () => {
console.log(`Server running at http://127.0.0.1:${PORT}/`)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment