Last active
May 12, 2018 03:58
-
-
Save maisonm/10e38e132cb46420683d4f4106394869 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 app = express(); | |
const port = process.env.PORT || 5000; | |
// console.log that your server is up and running | |
app.listen(port, () => console.log(`Listening on port ${port}`)); | |
// create a GET route | |
app.get('/express_backend', (req, res) => { | |
res.send({ express: 'YOUR EXPRESS BACKEND IS CONNECTED TO REACT' }); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment