Skip to content

Instantly share code, notes, and snippets.

@maisonm
Last active May 12, 2018 03:58
Show Gist options
  • Save maisonm/10e38e132cb46420683d4f4106394869 to your computer and use it in GitHub Desktop.
Save maisonm/10e38e132cb46420683d4f4106394869 to your computer and use it in GitHub Desktop.
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