Created
July 30, 2018 17:33
-
-
Save MarkNewcomb1/4022ef4b6f3b1770d4df806ba239f952 to your computer and use it in GitHub Desktop.
barebones express server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express') | |
| const app = express() | |
| const bodyParser = require('body-parser') | |
| const port = 9000 | |
| const cors = require('cors') | |
| app.use(cors()) | |
| app.use(bodyParser.json()) | |
| app.get('/',(request,response,next) => { | |
| response.send('🎉') | |
| }) | |
| app.listen(port,() => { | |
| console.log(`I am listening on ${port}`) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment