Last active
March 4, 2020 09:20
-
-
Save alex3165/20ed1d5e893e19fa61dc2f03e97e837b to your computer and use it in GitHub Desktop.
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 bodyParser = require('body-parser'); | |
const cors = require('cors'); | |
const app = express(); | |
// Send CORS Headers, useful if API is requested from a browser | |
app.use(cors()); | |
// Parse request body to json | |
app.use(bodyParser.json()); | |
app.get('/', (req, res) => { | |
res.send({ message: 'healthy' }) | |
}); | |
app.listen(3000, () => console.log('Gator app listening on port 3000!')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment